/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * InterfaceGrafica.java
 *
 * Created on Nov 21, 2011, 4:19:39 PM
 */
package labbd_._projetofinal;


import java.awt.CardLayout;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.geom.AffineTransform;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FilenameFilter;
import java.io.IOException;
import java.math.BigDecimal;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.imageio.ImageIO;
import javax.swing.ImageIcon;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import javax.swing.UIManager;
import oracle.sql.BLOB;

/**
 *
 * @author rnakanishi
 */
public class InterfaceGrafica extends javax.swing.JFrame {

	private DataBase db = null;
	private Usuario user = null;
	private FilenameFilter FiltroDeImagem;
    ArrayList<Oferta> ofertas = new ArrayList<Oferta>();
	private int indexOfertas = 0;
	private int compHistPage = 0;
	private int presHistPage = 0;
	private int prodPage = 0;
	ArrayList<Presente> presentes = new ArrayList<Presente>();
	ArrayList<Compra> compras = new ArrayList<Compra>();
	ArrayList<Produto> produtos = new ArrayList<Produto>();
	ArrayList<BigDecimal> recomendacoes = new ArrayList<BigDecimal>();
	ArrayList<Empresa> empresas = new ArrayList<Empresa>();
    /** Creates new form InterfaceGrafica */
    public InterfaceGrafica() {
        initComponents();
		try {
                    db = new DataBase();
                    user = new Usuario ();
                    FiltroDeImagem = new FilenameFilter() {
                                    @Override
                                    public boolean accept(File dir, String name) {
                                                    return !(name.endsWith(".png") || name.endsWith(".jpg") ||
                                                                    name.endsWith(".jpeg") || name.endsWith(".bmp"));
                                    }
                    };
                    CardLayout cl = (CardLayout) PainelDeFundo.getLayout();
                    cl.show(PainelDeFundo, "inicial");
		} catch (SQLException ex) {
                    JOptionPane.showMessageDialog(null, "Não foi possível conectar ao banco de dados",
                                    "Erro", JOptionPane.ERROR_MESSAGE);
                    System.exit(1);
		} catch (ClassNotFoundException cnfex) {
                    System.err.println (cnfex.getException());
                    System.exit(1);
		}
		try{
                    ofertas = Oferta.getOfertasValidas(db.getConnection());
                    if(!ofertas.isEmpty()){
                            Oferta of = ofertas.get(indexOfertas);

                            TUMBotaoCompra.setEnabled(true);
                            TIMLabelVIDProduto.setText(""+of.getIdProduto());
                            TIMLabelVNroOferta.setText(""+of.getNroOferta());
                            TIMLabelVValorOri.setText(""+of.getValorOriginal());
                            TIMLabelVValorPromo.setText(""+of.getValorPromocao());
                            TIMAreaDescricao.setText(""+of.getDescricao());

                            TUMLabelVIDProduto.setText(""+of.getIdProduto());
                            TUMLabelVNroOferta.setText(""+of.getNroOferta());
                            TUMLabelVValorOri.setText(""+of.getValorOriginal());
                            TUMLabelVValorPromo.setText(""+of.getValorPromocao());
                            TUMAreaDescricao.setText(""+of.getDescricao());

                            TIMLabelImage.setIcon(desenhaImagem(of.getFoto(), 343, 321));
                            TUMLabelImagem.setIcon(desenhaImagem(of.getFoto(), 343, 321));

                    } else {
                        System.err.println("Nao ha ofertas");

                        TUMLabelVIDProduto.setText("");
                        TUMLabelVNroOferta.setText("");
                        TUMLabelVValorOri.setText("");
                        TUMLabelVValorPromo.setText("");
                        TUMBotaoCompra.setEnabled(false);
                        TUMAreaDescricao.setText("");
                        FileInputStream file;
                        Image img = null;
                        try {
                            file = new FileInputStream("./images/naooferta.jpg");
                            img = ImageIO.read(file);
                        } catch (FileNotFoundException ex) {
                            Logger.getLogger(InterfaceGrafica.class.getName()).log(Level.SEVERE, null, ex);
                        } catch (IOException ex) {
                            System.err.println("IOException: " + ex.getMessage());
                        }
                        TUMLabelImagem.setIcon(desenhaImagem(img, 343, 321));
                        TIMLabelImage.setIcon(desenhaImagem(img, 343, 321));
                        
                    }
		} catch (SQLException e) {
			System.err.println("Exception" + e.getMessage());
		} catch (NullPointerException e){
			System.err.println("Exception " +e.getCause() +" "+e.getMessage());
		}
            
        /*Incializando a primeira oferta*/
            

    }

    private ImageIcon desenhaImagem(Image image, int width, int height){

        BufferedImage resizedImage = new BufferedImage(
                width, width,
                BufferedImage.TYPE_INT_ARGB);
        Graphics2D g = resizedImage.createGraphics();
        g.drawImage(image, 0, 0, width, height, null);
        g.dispose();

        ImageIcon im = (new ImageIcon(resizedImage));
        return im;
    }
    

	private void TelaProdutoClear () {
		TAPBotaoAnterior.setEnabled(true);
		TAPBotaoProximo.setEnabled(true);
		TAPPainelTL.setVisible(true);
		TAPPainelTR.setVisible(true);
		TAPPainelBL.setVisible(true);
		TAPPainelBR.setVisible(true);

	}

	private void TelaHistoricoCompraClear () {
		TUHCBotaoAnterior.setEnabled(true);
		TUHCBotaoProximo.setEnabled(true);
		TUHCPainelTL.setVisible(true);
		TUHCPainelTR.setVisible(true);
		TUHCPainelBL.setVisible(true);
		TUHCPainelBR.setVisible(true);
	}

	private void TelaHistoricoPresenteClear () {
		TUHPBotaoAnterior.setEnabled(true);
		TUHPBotaoProximo.setEnabled(true);
		TUHPPainelTL.setVisible(true);
		TUHPPainelTR.setVisible(true);
		TUHPPainelBL.setVisible(true);
		TUHPPainelBR.setVisible(true);
	}

	private void TelaCompraClear () {
		TCLabelLogin.setForeground(UIManager.getColor("Button.foreground"));
		TCLabelNro.setForeground(UIManager.getColor("Button.foreground"));
		TCLabelCVC.setForeground(UIManager.getColor("Button.foreground"));
		TCLabelValidade.setForeground(UIManager.getColor("Button.foreground"));
	}

	private void TelaInicialClear() {
		BLBotaoCadastro.setVisible(true);
		CardLayout cl = (CardLayout) PainelDeFundo.getLayout();
		cl.show(PainelDeFundo, "inicial");
	}

	private void TelaLoginClear () {
		TLLabelErro.setVisible (false);
		TelaLogin.setAlwaysOnTop(true);
	}

	private void TelaCadastroUsuarioClear () {
		TCULabelErro.setVisible (false);
		TCULabelNome.setForeground(UIManager.getColor("Button.foreground"));
		TCULabelCPF.setForeground(UIManager.getColor("Button.foreground"));
		TCULabelEmail.setForeground(UIManager.getColor("Button.foreground"));
		TCULabelSenha.setForeground(UIManager.getColor("Button.foreground"));
		TCULabelConfirmacao.setForeground(UIManager.getColor("Button.foreground"));
		TCULabelNro.setForeground(UIManager.getColor("Button.foreground"));
		TelaCadastroUsuario.setAlwaysOnTop(true);
	}

	private void TelaCadastroOfertaClear() {
		TCOLabelIdproduto.setForeground(UIManager.getColor("Button.foreground"));
		TCOLabelQuantidade.setForeground(UIManager.getColor("Button.foreground"));
		TCOLabelValidade.setForeground(UIManager.getColor("Button.foreground"));
		TCOLabelDiasuteis.setForeground(UIManager.getColor("Button.foreground"));
		TCOLabelHorario.setForeground(UIManager.getColor("Button.foreground"));
		TCOLabelLocal.setForeground(UIManager.getColor("Button.foreground"));
		TCOLabelDiretorioImagem.setForeground(UIManager.getColor("Button.foreground"));
		TelaCadastroOferta.setAlwaysOnTop(true);
	}

        private void TelaCadastroProdutoClear() {
            TCPRBFisico.setEnabled(true);
            TCPRBServico.setEnabled(false);
			TCPLabelValor.setForeground(UIManager.getColor("Button.foreground"));
			TCPLabelDescricao.setForeground(UIManager.getColor("Button.foreground"));
			TCPLabelTipo.setForeground(UIManager.getColor("Button.foreground"));
            TelaCadastroProduto.setAlwaysOnTop(true);
            TCPLabelDiretorioImagem.setText("");

        }
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        TelaLogin = new javax.swing.JDialog();
        TLCampoSenha = new javax.swing.JPasswordField();
        TLCampoLogin = new javax.swing.JTextField();
        TLLabelSenha = new javax.swing.JLabel();
        TLBotaoLogin = new javax.swing.JButton();
        TLLabelLogin = new javax.swing.JLabel();
        TLLabelErro = new javax.swing.JLabel();
        TLRBotaoEmail = new javax.swing.JRadioButton();
        TLRBotaoCPF = new javax.swing.JRadioButton();
        TelaCadastroUsuario = new javax.swing.JDialog();
        TCUCampoSenha = new javax.swing.JPasswordField();
        TCULabelSenha = new javax.swing.JLabel();
        TCULabelUF = new javax.swing.JLabel();
        TCUBotaoCadastro = new javax.swing.JButton();
        TCULabelConfirmacao = new javax.swing.JLabel();
        TCUCampoConfirmacao = new javax.swing.JPasswordField();
        TCULabelCidade = new javax.swing.JLabel();
        TCUCampoCidade = new javax.swing.JTextField();
        TCULabelBairro = new javax.swing.JLabel();
        TCUCampoBairro = new javax.swing.JTextField();
        TCULabelNro = new javax.swing.JLabel();
        TCULabelRua = new javax.swing.JLabel();
        TCUCampoRua = new javax.swing.JTextField();
        TCULabelCEP = new javax.swing.JLabel();
        TCULabelEmail = new javax.swing.JLabel();
        TCUCampoEmail = new javax.swing.JTextField();
        TCULabelCPF = new javax.swing.JLabel();
        TCULabelNome = new javax.swing.JLabel();
        TCUCampoNome = new javax.swing.JTextField();
        TCULabelEndereco = new javax.swing.JLabel();
        TCULabelDados = new javax.swing.JLabel();
        TCUComboUF = new javax.swing.JComboBox();
        TCULabelAviso = new javax.swing.JLabel();
        TCULabelErro = new javax.swing.JLabel();
        TCUCampoCPF = new javax.swing.JFormattedTextField();
        TCUCampoNro = new javax.swing.JFormattedTextField();
        TCUCampoCEP = new javax.swing.JFormattedTextField();
        TCULabelAvisoDigitos = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        TelaCadastroOferta = new javax.swing.JDialog();
        TCOLabelIdproduto = new javax.swing.JLabel();
        TCOLabelQuantidade = new javax.swing.JLabel();
        TCOLabelValidade = new javax.swing.JLabel();
        TCOLabelDiasuteis = new javax.swing.JLabel();
        TCOLabelHorario = new javax.swing.JLabel();
        TCOLabelLocal = new javax.swing.JLabel();
        TCOLabelRetirada = new javax.swing.JLabel();
        TCOLabelDados = new javax.swing.JLabel();
        TCOCampoQuantidade = new javax.swing.JFormattedTextField();
        TCOCampoValidade = new javax.swing.JFormattedTextField();
        TCOLabelAvisoEmdias = new javax.swing.JLabel();
        TCOCheckSeg = new javax.swing.JCheckBox();
        TCOCheckTer = new javax.swing.JCheckBox();
        TCOCheckQua = new javax.swing.JCheckBox();
        TCOCheckQui = new javax.swing.JCheckBox();
        TCOCheckSex = new javax.swing.JCheckBox();
        TCOCheckSab = new javax.swing.JCheckBox();
        TCOCheckDom = new javax.swing.JCheckBox();
        TCOCampoHorario = new javax.swing.JTextField();
        TCOCampoLocal = new javax.swing.JTextField();
        TCOBotaoCadastro = new javax.swing.JButton();
        TCOLabelAvisoObrigatorio = new javax.swing.JLabel();
        TCOBotaoSelecionarImagem = new javax.swing.JButton();
        TCOLabelDiretorioImagem = new javax.swing.JLabel();
        TCOLabelNroPessoas = new javax.swing.JLabel();
        TCOCampoNroPessoas = new javax.swing.JFormattedTextField();
        TCOLabelVIdProduto = new javax.swing.JLabel();
        OfertaFileChooser = new javax.swing.JFileChooser();
        TelaCompra = new javax.swing.JDialog();
        TCLabelFormaPagamento = new javax.swing.JLabel();
        TCRBotaoBoleto = new javax.swing.JRadioButton();
        TCRBotaoPayPal = new javax.swing.JRadioButton();
        TCRBotaoCartao = new javax.swing.JRadioButton();
        TCComboBanco = new javax.swing.JComboBox();
        TCCampoNro = new javax.swing.JFormattedTextField();
        TCLabelNro = new javax.swing.JLabel();
        TCLabelCVC = new javax.swing.JLabel();
        TCCampoCVC = new javax.swing.JFormattedTextField();
        TCLabelBanco = new javax.swing.JLabel();
        TCLabelValidade = new javax.swing.JLabel();
        TCCampoValidade = new javax.swing.JFormattedTextField();
        TCBotaoComprar = new javax.swing.JButton();
        TCLabelObrigatorio = new javax.swing.JLabel();
        TCLabelFormato = new javax.swing.JLabel();
        TCLabelLogin = new javax.swing.JLabel();
        TCCampoLogin = new javax.swing.JTextField();
        TCComboBandeira = new javax.swing.JComboBox();
        TCLabelBandeira = new javax.swing.JLabel();
        TCLabelDigitos = new javax.swing.JLabel();
        TelaRecomendacao = new javax.swing.JDialog();
        TRBotaoOk = new javax.swing.JButton();
        TRLabelRecOferta = new javax.swing.JLabel();
        TRComboUsuarios = new javax.swing.JComboBox();
        TelaCadastroProduto = new javax.swing.JDialog();
        TCPLabelValor = new javax.swing.JLabel();
        TCPLabelDados = new javax.swing.JLabel();
        TCPBotaoCadastro = new javax.swing.JButton();
        TCPLabelAvisoObrigatorio = new javax.swing.JLabel();
        TCPBotaoSelecionarImagem = new javax.swing.JButton();
        TCPLabelDiretorioImagem = new javax.swing.JLabel();
        TCPCampoValor = new javax.swing.JFormattedTextField();
        TCPLabelValorRS = new javax.swing.JLabel();
        TCPLabelDescricao = new javax.swing.JLabel();
        TCPLabelTipo = new javax.swing.JLabel();
        TCPRBServico = new javax.swing.JRadioButton();
        TCPRBFisico = new javax.swing.JRadioButton();
        TCPLabelEmpresa = new javax.swing.JLabel();
        jScrollPane5 = new javax.swing.JScrollPane();
        TCPAreaDescricao = new javax.swing.JEditorPane();
        TCPComboEmpresaCad = new javax.swing.JComboBox();
        ProdutoFileChooser = new javax.swing.JFileChooser();
        BarraCreditos = new javax.swing.JPanel();
        BarraLogin = new javax.swing.JPanel();
        BLBotaoCadastro = new javax.swing.JButton();
        BLBotaoLogin = new javax.swing.JToggleButton();
        BLLabelSaudacao = new javax.swing.JLabel();
        BLLabelUsuario = new javax.swing.JLabel();
        BLLabelCreditos = new javax.swing.JLabel();
        PainelDeFundo = new javax.swing.JPanel();
        TelaInicial = new javax.swing.JPanel();
        TIOpcoes = new javax.swing.JPanel();
        TIOBotaoMaisOfertas = new javax.swing.JButton();
        TIOBotaoOfertasAnteriores = new javax.swing.JButton();
        TIOLabelGruspon = new javax.swing.JLabel();
        TIOLabelNaoMaisOfertas = new javax.swing.JLabel();
        TIMostruario = new javax.swing.JPanel();
        TIMLabelIDProduto = new javax.swing.JLabel();
        TIMLabelDescricao = new javax.swing.JLabel();
        TIMPainelDescricao = new javax.swing.JScrollPane();
        TIMAreaDescricao = new javax.swing.JTextArea();
        TIMLabelNroOferta = new javax.swing.JLabel();
        TIMLabelnformacoes = new javax.swing.JLabel();
        TIMLabelValorOriginal = new javax.swing.JLabel();
        TIMLabelValorPromocional = new javax.swing.JLabel();
        TIMLabelVValorPromo = new javax.swing.JLabel();
        TIMLabelVIDProduto = new javax.swing.JLabel();
        TIMLabelVNroOferta = new javax.swing.JLabel();
        TIMLabelVValorOri = new javax.swing.JLabel();
        TIMPanelImage = new javax.swing.JPanel();
        TIMLabelImage = new javax.swing.JLabel();
        TelaAdmin = new javax.swing.JPanel();
        TAOpcoes = new javax.swing.JPanel();
        TALabelGruspon = new javax.swing.JLabel();
        TAOBotaoAtualizar = new javax.swing.JButton();
        jButton1 = new javax.swing.JButton();
        TAMostruario = new javax.swing.JPanel();
        TAPainelProdutos = new javax.swing.JPanel();
        TAPBotaoProximo = new javax.swing.JButton();
        TAPBotaoAnterior = new javax.swing.JButton();
        TAPPainelBR = new javax.swing.JPanel();
        TAPBRLabelIDProduto = new javax.swing.JLabel();
        TAPBRLabelVIDProduto = new javax.swing.JLabel();
        TAPBRLabelImagem = new javax.swing.JLabel();
        TAPBRLabelEmpresa = new javax.swing.JLabel();
        TAPBRLabelVEmpresa = new javax.swing.JLabel();
        TAPBRLabelValor = new javax.swing.JLabel();
        TAPBRLabelVValor = new javax.swing.JLabel();
        TAPBRLBotaoCadastro = new javax.swing.JButton();
        TAPBRLabelVTipo = new javax.swing.JLabel();
        jScrollPane4 = new javax.swing.JScrollPane();
        jTextPane4 = new javax.swing.JTextPane();
        TAPBRBotaoAlteraFoto = new javax.swing.JButton();
        TAPPainelTR = new javax.swing.JPanel();
        TAPTRLabelIDProduto = new javax.swing.JLabel();
        TAPTRLabelVIDProduto = new javax.swing.JLabel();
        TAPTRLabelImagem = new javax.swing.JLabel();
        TAPTRLabelEmpresa = new javax.swing.JLabel();
        TAPTRLabelVEmpresa = new javax.swing.JLabel();
        TAPTRLabelValor = new javax.swing.JLabel();
        TAPTRLabelVValor = new javax.swing.JLabel();
        TAPTRLBotaoCadastro = new javax.swing.JButton();
        TAPTRLabelVTipo = new javax.swing.JLabel();
        jScrollPane2 = new javax.swing.JScrollPane();
        TAPTRCampoDescricao = new javax.swing.JTextPane();
        TAPTRBotaoAlteraFoto = new javax.swing.JButton();
        TAPPainelTL = new javax.swing.JPanel();
        TAPTLLabelIDProduto = new javax.swing.JLabel();
        TAPTLLabelVIDProduto = new javax.swing.JLabel();
        TAPTLLabelImagem = new javax.swing.JLabel();
        TAPTLLabelEmpresa = new javax.swing.JLabel();
        TAPTLLabelVEmpresa = new javax.swing.JLabel();
        TAPTLLabelValor = new javax.swing.JLabel();
        TAPTLLabelVValor = new javax.swing.JLabel();
        TAPTLLBotaoCadastro = new javax.swing.JButton();
        TAPTLLabelVTipo = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        TAPTLCampoDescricao = new javax.swing.JTextPane();
        TAPTLBotaoAlteraFoto = new javax.swing.JButton();
        TAPPainelBL = new javax.swing.JPanel();
        TAPBLLabelIDProduto = new javax.swing.JLabel();
        TAPBLLabelVIDProduto = new javax.swing.JLabel();
        TAPBLLabelImagem = new javax.swing.JLabel();
        TAPBLLabelEmpresa = new javax.swing.JLabel();
        TAPBLLabelVEmpresa = new javax.swing.JLabel();
        TAPBLLabelValor = new javax.swing.JLabel();
        TAPBLLabelVValor = new javax.swing.JLabel();
        TAPBLLBotaoCadastro = new javax.swing.JButton();
        TAPBLLabelVTipo = new javax.swing.JLabel();
        jScrollPane3 = new javax.swing.JScrollPane();
        jTextPane3 = new javax.swing.JTextPane();
        TAPBLBotaoAlteraFoto = new javax.swing.JButton();
        TelaUsuario = new javax.swing.JPanel();
        TUPainelDeFundo = new javax.swing.JPanel();
        TUMostruario = new javax.swing.JPanel();
        TUMPainelImagem = new javax.swing.JPanel();
        TUMLabelImagem = new javax.swing.JLabel();
        TUMLabelIDProduto = new javax.swing.JLabel();
        TUMLabelDescricao = new javax.swing.JLabel();
        TUMPainelDescricao = new javax.swing.JScrollPane();
        TUMAreaDescricao = new javax.swing.JTextArea();
        TUMLabelNroOferta = new javax.swing.JLabel();
        TUMLabelnformacoes = new javax.swing.JLabel();
        TUMLabelValorOriginal = new javax.swing.JLabel();
        TUMLabelValorPromocional = new javax.swing.JLabel();
        TUMLabelVValorPromo = new javax.swing.JLabel();
        TUMLabelVIDProduto = new javax.swing.JLabel();
        TUMLabelVNroOferta = new javax.swing.JLabel();
        TUMLabelVValorOri = new javax.swing.JLabel();
        TUMBotaoCompra = new javax.swing.JButton();
        TUMBotaoMaisOfertas = new javax.swing.JButton();
        TUMBotaoOfertasAnteriores = new javax.swing.JButton();
        TUHistorico = new javax.swing.JTabbedPane();
        TUHPainelCompras = new javax.swing.JPanel();
        TUHCBotaoProximo = new javax.swing.JButton();
        TUHCBotaoAnterior = new javax.swing.JButton();
        TUHCPainelBR = new javax.swing.JPanel();
        TUHCBRLabelNro = new javax.swing.JLabel();
        TUHCBRLabelIDProduto = new javax.swing.JLabel();
        TUHCBRLabelVIDProduto = new javax.swing.JLabel();
        TUHCBRLabelVNro = new javax.swing.JLabel();
        TUHCBRLabelData = new javax.swing.JLabel();
        TUHCBRLabelVData = new javax.swing.JLabel();
        TUHCBRLabelIDCupom = new javax.swing.JLabel();
        TUHCBRLabelVIDCupom = new javax.swing.JLabel();
        TUHCBRLabelImagem = new javax.swing.JLabel();
        TUHCPainelTR = new javax.swing.JPanel();
        TUHCTRLabelNro = new javax.swing.JLabel();
        TUHCTRLabelIDProduto = new javax.swing.JLabel();
        TUHCTRLabelVIDProduto = new javax.swing.JLabel();
        TUHCTRLabelVNro = new javax.swing.JLabel();
        TUHCTRLabelData = new javax.swing.JLabel();
        TUHCTRLabelVData = new javax.swing.JLabel();
        TUHCTRLabelIDCupom = new javax.swing.JLabel();
        TUHCTRLabelVIDCupom = new javax.swing.JLabel();
        TUHCTRLabelImagem = new javax.swing.JLabel();
        TUHCPainelTL = new javax.swing.JPanel();
        TUHCTLLabelNro = new javax.swing.JLabel();
        TUHCTLLabelIDProduto = new javax.swing.JLabel();
        TUHCTLLabelVIDProduto = new javax.swing.JLabel();
        TUHCTLLabelVNro = new javax.swing.JLabel();
        TUHCTTLabelData = new javax.swing.JLabel();
        TUHCTLLabelVData = new javax.swing.JLabel();
        TUHCTLLabelIDCupom = new javax.swing.JLabel();
        TUHCTLLabelVIDCupom = new javax.swing.JLabel();
        TUHCTLLabelImagem = new javax.swing.JLabel();
        TUHCPainelBL = new javax.swing.JPanel();
        TUHCBLLabelNro = new javax.swing.JLabel();
        TUHCBLLabelIDProduto = new javax.swing.JLabel();
        TUHCBLLabelVIDProduto = new javax.swing.JLabel();
        TUHCBLLabelVNro = new javax.swing.JLabel();
        TUHCBTLabelData = new javax.swing.JLabel();
        TUHCBLLabelVData = new javax.swing.JLabel();
        TUHCBLLabelIDCupom = new javax.swing.JLabel();
        TUHCBLLabelVIDCupom = new javax.swing.JLabel();
        TUHCBLLabelImagem = new javax.swing.JLabel();
        TUHPainelPresentes = new javax.swing.JPanel();
        TUHPBotaoProximo = new javax.swing.JButton();
        TUHPBotaoAnterior = new javax.swing.JButton();
        TUHPPainelBR = new javax.swing.JPanel();
        TUHPBRLabelNro = new javax.swing.JLabel();
        TUHPBRLabelIDProduto = new javax.swing.JLabel();
        TUHPBRLabelVIDProduto = new javax.swing.JLabel();
        TUHPBRLabelVNro = new javax.swing.JLabel();
        TUHPBRLabelNome = new javax.swing.JLabel();
        TUHPBRLabelVNome = new javax.swing.JLabel();
        TUHPBRLabelIDCupom = new javax.swing.JLabel();
        TUHPBRLabelVIDCupom = new javax.swing.JLabel();
        TUHPBRLabelImagem = new javax.swing.JLabel();
        TUHPPainelTR = new javax.swing.JPanel();
        TUHPTRLabelNro = new javax.swing.JLabel();
        TUHPTRLabelIDProduto = new javax.swing.JLabel();
        TUHPTRLabelVIDProduto = new javax.swing.JLabel();
        TUHPTRLabelVNro = new javax.swing.JLabel();
        TUHPTRLabelNome = new javax.swing.JLabel();
        TUHPTRLabelVNome = new javax.swing.JLabel();
        TUHPTRLabelIDCupom = new javax.swing.JLabel();
        TUHPTRLabelVIDCupom = new javax.swing.JLabel();
        TUHPTRLabelImagem = new javax.swing.JLabel();
        TUHPPainelTL = new javax.swing.JPanel();
        TUHPTLLabelNro = new javax.swing.JLabel();
        TUHPTLLabelIDProduto = new javax.swing.JLabel();
        TUHPTLLabelVIDProduto = new javax.swing.JLabel();
        TUHPTLLabelVNro = new javax.swing.JLabel();
        TUHPTTLabelNome = new javax.swing.JLabel();
        TUHPTLLabelVNome = new javax.swing.JLabel();
        TUHPTLLabelIDCupom = new javax.swing.JLabel();
        TUHPTLLabelVIDCupom = new javax.swing.JLabel();
        TUHPTLLabelImagem = new javax.swing.JLabel();
        TUHPPainelBL = new javax.swing.JPanel();
        TUHPBLLabelNro = new javax.swing.JLabel();
        TUHPBLLabelIDProduto = new javax.swing.JLabel();
        TUHPBLLabelVIDProduto = new javax.swing.JLabel();
        TUHPBLLabelVNro = new javax.swing.JLabel();
        TUHPBTLabelNome = new javax.swing.JLabel();
        TUHPBLLabelVNome = new javax.swing.JLabel();
        TUHPBLLabelIDCupom = new javax.swing.JLabel();
        TUHPBLLabelVIDCupom = new javax.swing.JLabel();
        TUHPBLLabelImagem = new javax.swing.JLabel();
        TUOpcoes = new javax.swing.JPanel();
        TUOBotaoHistorico = new javax.swing.JButton();
        TUOLabelGruspon = new javax.swing.JLabel();
        TUOBotaoOferta = new javax.swing.JButton();

        TelaLogin.setTitle("Login");
        TelaLogin.setAlwaysOnTop(true);
        TelaLogin.setBounds(new java.awt.Rectangle(100, 100, 0, 0));
        TelaLogin.setMinimumSize(new java.awt.Dimension(347, 182));
        TelaLogin.setResizable(false);
        TelaLogin.addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowDeactivated(java.awt.event.WindowEvent evt) {
                TelaLoginWindowDeactivated(evt);
            }
        });
        TelaLogin.addComponentListener(new java.awt.event.ComponentAdapter() {
            public void componentShown(java.awt.event.ComponentEvent evt) {
                TelaLoginComponentShown(evt);
            }
        });

        TLLabelSenha.setText("Senha");

        TLBotaoLogin.setText("Login");
        TLBotaoLogin.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TLBotaoLoginActionPerformed(evt);
            }
        });

        TLLabelLogin.setText("E-mail/CPF");

        TLLabelErro.setForeground(new java.awt.Color(241, 22, 22));
        TLLabelErro.setBorder(null);

        TLRBotaoEmail.setSelected(true);
        TLRBotaoEmail.setText("E-mail");
        TLRBotaoEmail.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TLRBotaoEmailActionPerformed(evt);
            }
        });

        TLRBotaoCPF.setText("CPF");
        TLRBotaoCPF.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TLRBotaoCPFActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout TelaLoginLayout = new javax.swing.GroupLayout(TelaLogin.getContentPane());
        TelaLogin.getContentPane().setLayout(TelaLoginLayout);
        TelaLoginLayout.setHorizontalGroup(
            TelaLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TelaLoginLayout.createSequentialGroup()
                .addGap(26, 26, 26)
                .addGroup(TelaLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(TelaLoginLayout.createSequentialGroup()
                        .addComponent(TLRBotaoEmail)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TLRBotaoCPF)
                        .addGap(193, 193, 193))
                    .addGroup(TelaLoginLayout.createSequentialGroup()
                        .addGroup(TelaLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(TelaLoginLayout.createSequentialGroup()
                                .addComponent(TLLabelErro, javax.swing.GroupLayout.DEFAULT_SIZE, 201, Short.MAX_VALUE)
                                .addGap(46, 46, 46)
                                .addComponent(TLBotaoLogin))
                            .addGroup(TelaLoginLayout.createSequentialGroup()
                                .addGroup(TelaLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                    .addComponent(TLLabelLogin, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(TLLabelSenha, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 76, Short.MAX_VALUE))
                                .addGap(43, 43, 43)
                                .addGroup(TelaLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(TLCampoSenha, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 178, Short.MAX_VALUE)
                                    .addComponent(TLCampoLogin, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 178, Short.MAX_VALUE))))
                        .addGap(24, 24, 24))))
        );
        TelaLoginLayout.setVerticalGroup(
            TelaLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, TelaLoginLayout.createSequentialGroup()
                .addContainerGap(25, Short.MAX_VALUE)
                .addGroup(TelaLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(TLRBotaoCPF)
                    .addComponent(TLRBotaoEmail))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(TelaLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(TLLabelLogin, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(TLCampoLogin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(TelaLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(TLCampoSenha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(TLLabelSenha, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(TelaLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(TLLabelErro, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(TLBotaoLogin))
                .addGap(23, 23, 23))
        );

        TelaCadastroUsuario.setTitle("Cadastre-se");
        TelaCadastroUsuario.setAlwaysOnTop(true);
        TelaCadastroUsuario.setBounds(new java.awt.Rectangle(100, 100, 0, 0));
        TelaCadastroUsuario.setMinimumSize(new java.awt.Dimension(524, 488));
        TelaCadastroUsuario.setResizable(false);
        TelaCadastroUsuario.addComponentListener(new java.awt.event.ComponentAdapter() {
            public void componentShown(java.awt.event.ComponentEvent evt) {
                TelaCadastroUsuarioComponentShown(evt);
            }
        });

        TCULabelSenha.setText("Senha*");

        TCULabelUF.setText("UF");

        TCUBotaoCadastro.setText("Cadastrar");
        TCUBotaoCadastro.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TCUBotaoCadastroActionPerformed(evt);
            }
        });

        TCULabelConfirmacao.setText("Confirmação de Senha*");

        TCULabelCidade.setText("Cidade");

        TCULabelBairro.setText("Bairro");

        TCULabelNro.setText("Número");

        TCULabelRua.setText("Rua");

        TCULabelCEP.setText("CEP");

        TCULabelEmail.setText("E-mail*");

        TCULabelCPF.setText("CPF*");

        TCULabelNome.setText("Nome*");

        TCULabelEndereco.setFont(new java.awt.Font("Ubuntu", 1, 16));
        TCULabelEndereco.setText("Endereço");

        TCULabelDados.setFont(new java.awt.Font("Ubuntu", 1, 17));
        TCULabelDados.setText("Dados Pessoais");

        TCUComboUF.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "AC", "AL", "AM", "AP", "BA", "CE", "DF", "ES", "GO", "MA", "MG", "MS", "MT", "PA", "PB", "PE", "PI", "PR", "RJ", "RN", "RO", "RR", "RS", "SC", "SE", "SP", "TO" }));

        TCULabelAviso.setFont(new java.awt.Font("Ubuntu", 0, 13));
        TCULabelAviso.setForeground(java.awt.Color.red);
        TCULabelAviso.setText("*Campos obrigatórios");

        TCULabelErro.setForeground(java.awt.Color.red);

        try {
            TCUCampoCPF.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("###########")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }

        TCUCampoNro.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#0"))));
        TCUCampoNro.setMinimumSize(new java.awt.Dimension(42, 28));

        try {
            TCUCampoCEP.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("########")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }

        TCULabelAvisoDigitos.setFont(new java.awt.Font("Ubuntu", 0, 13));
        TCULabelAvisoDigitos.setForeground(javax.swing.UIManager.getDefaults().getColor("textHighlight"));
        TCULabelAvisoDigitos.setText("max. 4 dígitos");

        jLabel2.setFont(new java.awt.Font("Ubuntu", 0, 13));
        jLabel2.setForeground(javax.swing.UIManager.getDefaults().getColor("textHighlight"));
        jLabel2.setText("11 dígitos");

        jLabel3.setFont(new java.awt.Font("Ubuntu", 0, 13));
        jLabel3.setForeground(javax.swing.UIManager.getDefaults().getColor("textHighlight"));
        jLabel3.setText("8 dígitos");

        jLabel1.setFont(new java.awt.Font("Ubuntu", 0, 13));
        jLabel1.setForeground(javax.swing.UIManager.getDefaults().getColor("textHighlight"));
        jLabel1.setText("máx. 8 caracteres");

        javax.swing.GroupLayout TelaCadastroUsuarioLayout = new javax.swing.GroupLayout(TelaCadastroUsuario.getContentPane());
        TelaCadastroUsuario.getContentPane().setLayout(TelaCadastroUsuarioLayout);
        TelaCadastroUsuarioLayout.setHorizontalGroup(
            TelaCadastroUsuarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TelaCadastroUsuarioLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(TelaCadastroUsuarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(TelaCadastroUsuarioLayout.createSequentialGroup()
                        .addGroup(TelaCadastroUsuarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(TelaCadastroUsuarioLayout.createSequentialGroup()
                                .addGap(12, 12, 12)
                                .addGroup(TelaCadastroUsuarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(TCULabelUF, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGroup(TelaCadastroUsuarioLayout.createSequentialGroup()
                                        .addGroup(TelaCadastroUsuarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(TCULabelBairro)
                                            .addComponent(TCULabelRua))
                                        .addGap(18, 18, 18)
                                        .addGroup(TelaCadastroUsuarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                            .addComponent(TCUCampoBairro)
                                            .addComponent(TCUCampoRua, javax.swing.GroupLayout.PREFERRED_SIZE, 156, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(TCUComboUF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addGap(20, 20, 20)
                                        .addGroup(TelaCadastroUsuarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(TCULabelNro)
                                            .addComponent(TCULabelCidade, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(TCULabelCEP))
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addGroup(TelaCadastroUsuarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(TCUCampoCidade, javax.swing.GroupLayout.DEFAULT_SIZE, 169, Short.MAX_VALUE)
                                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, TelaCadastroUsuarioLayout.createSequentialGroup()
                                                .addComponent(TCUCampoCEP, javax.swing.GroupLayout.DEFAULT_SIZE, 105, Short.MAX_VALUE)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(jLabel3))
                                            .addGroup(TelaCadastroUsuarioLayout.createSequentialGroup()
                                                .addComponent(TCUCampoNro, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addGap(18, 18, 18)
                                                .addComponent(TCULabelAvisoDigitos)
                                                .addGap(5, 5, 5))))))
                            .addComponent(TCULabelEndereco, javax.swing.GroupLayout.PREFERRED_SIZE, 201, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(TelaCadastroUsuarioLayout.createSequentialGroup()
                                .addComponent(TCULabelAviso)
                                .addGap(276, 276, 276)
                                .addComponent(TCUBotaoCadastro))
                            .addComponent(TCULabelDados, javax.swing.GroupLayout.PREFERRED_SIZE, 201, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(TCULabelErro, javax.swing.GroupLayout.PREFERRED_SIZE, 343, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addContainerGap())
                    .addGroup(TelaCadastroUsuarioLayout.createSequentialGroup()
                        .addGap(12, 12, 12)
                        .addGroup(TelaCadastroUsuarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(TCULabelNome)
                            .addComponent(TCULabelConfirmacao)
                            .addComponent(TCULabelSenha, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(TCULabelEmail)
                            .addComponent(TCULabelCPF))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 66, Short.MAX_VALUE)
                        .addGroup(TelaCadastroUsuarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(TelaCadastroUsuarioLayout.createSequentialGroup()
                                .addGap(1, 1, 1)
                                .addGroup(TelaCadastroUsuarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                    .addComponent(TCUCampoConfirmacao, javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(TCUCampoSenha, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel1))
                            .addGroup(TelaCadastroUsuarioLayout.createSequentialGroup()
                                .addComponent(TCUCampoCPF, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel2))
                            .addComponent(TCUCampoEmail)
                            .addComponent(TCUCampoNome))
                        .addGap(38, 38, 38))))
        );
        TelaCadastroUsuarioLayout.setVerticalGroup(
            TelaCadastroUsuarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TelaCadastroUsuarioLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(TelaCadastroUsuarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(TelaCadastroUsuarioLayout.createSequentialGroup()
                        .addComponent(TCULabelDados, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(10, 10, 10)
                        .addComponent(TCULabelNome, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(TCULabelCPF, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(4, 4, 4)
                        .addComponent(TCULabelEmail, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(TCULabelSenha, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TCULabelConfirmacao, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(TelaCadastroUsuarioLayout.createSequentialGroup()
                        .addComponent(TCUCampoNome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(TelaCadastroUsuarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(TCUCampoCPF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel2))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TCUCampoEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(TelaCadastroUsuarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(TCUCampoSenha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel1))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TCUCampoConfirmacao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(26, 26, 26)
                .addComponent(TCULabelEndereco, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(TelaCadastroUsuarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(TelaCadastroUsuarioLayout.createSequentialGroup()
                        .addGroup(TelaCadastroUsuarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(TCULabelRua, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(TCULabelNro, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(TCUCampoRua, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(TelaCadastroUsuarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(TelaCadastroUsuarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(TCULabelBairro, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(TCUCampoBairro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(TCULabelCidade, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(TelaCadastroUsuarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(TelaCadastroUsuarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(TCULabelUF, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(TCUComboUF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(TCULabelCEP, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(TelaCadastroUsuarioLayout.createSequentialGroup()
                        .addGroup(TelaCadastroUsuarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(TCUCampoNro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(TCULabelAvisoDigitos))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(TCUCampoCidade, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(TelaCadastroUsuarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(TCUCampoCEP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel3))))
                .addGroup(TelaCadastroUsuarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(TelaCadastroUsuarioLayout.createSequentialGroup()
                        .addGap(22, 22, 22)
                        .addComponent(TCULabelErro, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 20, Short.MAX_VALUE)
                        .addComponent(TCULabelAviso))
                    .addGroup(TelaCadastroUsuarioLayout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TCUBotaoCadastro)))
                .addContainerGap())
        );

        TelaCadastroOferta.setTitle("Cadastro de Oferta");
        TelaCadastroOferta.setAlwaysOnTop(true);
        TelaCadastroOferta.setMinimumSize(new java.awt.Dimension(445, 466));
        TelaCadastroOferta.setResizable(false);
        TelaCadastroOferta.addComponentListener(new java.awt.event.ComponentAdapter() {
            public void componentShown(java.awt.event.ComponentEvent evt) {
                TelaCadastroOfertaComponentShown(evt);
            }
        });

        TCOLabelIdproduto.setText("ID do Produto");

        TCOLabelQuantidade.setText("Quantidade*");

        TCOLabelValidade.setText("Validade*");

        TCOLabelDiasuteis.setText("Dias da semana*");

        TCOLabelHorario.setText("Horario*");

        TCOLabelLocal.setText("Local*");

        TCOLabelRetirada.setFont(new java.awt.Font("Ubuntu", 1, 16));
        TCOLabelRetirada.setText("Retirada");

        TCOLabelDados.setFont(new java.awt.Font("Ubuntu", 1, 17));
        TCOLabelDados.setText("Dados da oferta");

        TCOCampoQuantidade.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#0"))));

        TCOCampoValidade.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#0"))));

        TCOLabelAvisoEmdias.setFont(new java.awt.Font("Ubuntu", 0, 13));
        TCOLabelAvisoEmdias.setForeground(javax.swing.UIManager.getDefaults().getColor("textHighlight"));
        TCOLabelAvisoEmdias.setText("*em dias");

        TCOCheckSeg.setText("Seg");

        TCOCheckTer.setText("Ter");

        TCOCheckQua.setText("Qua");

        TCOCheckQui.setText("Qui");

        TCOCheckSex.setText("Sex");

        TCOCheckSab.setText("Sab");

        TCOCheckDom.setText("Dom");

        TCOBotaoCadastro.setText("Cadastrar");
        TCOBotaoCadastro.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TCOBotaoCadastroActionPerformed(evt);
            }
        });

        TCOLabelAvisoObrigatorio.setFont(new java.awt.Font("Ubuntu", 0, 13));
        TCOLabelAvisoObrigatorio.setForeground(java.awt.Color.red);
        TCOLabelAvisoObrigatorio.setText("*Todos os campos são obrigatórios");

        TCOBotaoSelecionarImagem.setText("Selecionar Imagem");
        TCOBotaoSelecionarImagem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TCOBotaoSelecionarImagemActionPerformed(evt);
            }
        });

        TCOLabelDiretorioImagem.setFont(new java.awt.Font("Ubuntu", 0, 14));

        TCOLabelNroPessoas.setText("Número de pessoas*");

        TCOCampoNroPessoas.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#0"))));

        TCOLabelVIdProduto.setText("ID");

        javax.swing.GroupLayout TelaCadastroOfertaLayout = new javax.swing.GroupLayout(TelaCadastroOferta.getContentPane());
        TelaCadastroOferta.getContentPane().setLayout(TelaCadastroOfertaLayout);
        TelaCadastroOfertaLayout.setHorizontalGroup(
            TelaCadastroOfertaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TelaCadastroOfertaLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(TelaCadastroOfertaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(TelaCadastroOfertaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(TelaCadastroOfertaLayout.createSequentialGroup()
                            .addGroup(TelaCadastroOfertaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(TelaCadastroOfertaLayout.createSequentialGroup()
                                    .addGap(12, 12, 12)
                                    .addGroup(TelaCadastroOfertaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(TCOLabelIdproduto)
                                        .addComponent(TCOLabelQuantidade)
                                        .addComponent(TCOLabelValidade)
                                        .addComponent(TCOLabelNroPessoas))
                                    .addGap(36, 36, 36)
                                    .addGroup(TelaCadastroOfertaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(TCOLabelVIdProduto)
                                        .addGroup(TelaCadastroOfertaLayout.createSequentialGroup()
                                            .addGroup(TelaCadastroOfertaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                                .addComponent(TCOCampoQuantidade)
                                                .addComponent(TCOCampoValidade, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE))
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(TCOLabelAvisoEmdias))
                                        .addComponent(TCOCampoNroPessoas, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                .addComponent(TCOLabelDados))
                            .addGap(101, 101, 101))
                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, TelaCadastroOfertaLayout.createSequentialGroup()
                            .addGroup(TelaCadastroOfertaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addGroup(javax.swing.GroupLayout.Alignment.LEADING, TelaCadastroOfertaLayout.createSequentialGroup()
                                    .addGap(12, 12, 12)
                                    .addGroup(TelaCadastroOfertaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(TCOLabelDiasuteis)
                                        .addComponent(TCOLabelHorario)
                                        .addComponent(TCOLabelLocal))
                                    .addGap(25, 25, 25)
                                    .addGroup(TelaCadastroOfertaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                        .addGroup(TelaCadastroOfertaLayout.createSequentialGroup()
                                            .addComponent(TCOCheckQui)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(TCOCheckSex)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(TCOCheckSab)
                                            .addGap(6, 6, 6)
                                            .addComponent(TCOCheckDom))
                                        .addGroup(TelaCadastroOfertaLayout.createSequentialGroup()
                                            .addComponent(TCOCheckSeg)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(TCOCheckTer)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(TCOCheckQua))
                                        .addComponent(TCOCampoLocal, javax.swing.GroupLayout.DEFAULT_SIZE, 229, Short.MAX_VALUE)
                                        .addComponent(TCOCampoHorario)))
                                .addComponent(TCOLabelRetirada, javax.swing.GroupLayout.Alignment.LEADING))
                            .addGap(54, 54, 54)))
                    .addGroup(TelaCadastroOfertaLayout.createSequentialGroup()
                        .addGroup(TelaCadastroOfertaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, TelaCadastroOfertaLayout.createSequentialGroup()
                                .addComponent(TCOBotaoSelecionarImagem)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(TCOLabelDiretorioImagem, javax.swing.GroupLayout.DEFAULT_SIZE, 266, Short.MAX_VALUE))
                            .addGroup(TelaCadastroOfertaLayout.createSequentialGroup()
                                .addComponent(TCOLabelAvisoObrigatorio)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 129, Short.MAX_VALUE)
                                .addComponent(TCOBotaoCadastro)))
                        .addContainerGap())))
        );
        TelaCadastroOfertaLayout.setVerticalGroup(
            TelaCadastroOfertaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TelaCadastroOfertaLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(TCOLabelDados)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(TelaCadastroOfertaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(TCOLabelIdproduto)
                    .addComponent(TCOLabelVIdProduto))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(TelaCadastroOfertaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(TCOLabelQuantidade)
                    .addComponent(TCOCampoQuantidade, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(TelaCadastroOfertaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(TCOLabelValidade)
                    .addComponent(TCOCampoValidade, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(TCOLabelAvisoEmdias))
                .addGap(7, 7, 7)
                .addGroup(TelaCadastroOfertaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(TCOCampoNroPessoas, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(TCOLabelNroPessoas))
                .addGap(27, 27, 27)
                .addComponent(TCOLabelRetirada)
                .addGap(13, 13, 13)
                .addGroup(TelaCadastroOfertaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(TCOLabelDiasuteis)
                    .addComponent(TCOCheckSeg)
                    .addComponent(TCOCheckTer)
                    .addComponent(TCOCheckQua))
                .addGap(5, 5, 5)
                .addGroup(TelaCadastroOfertaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(TCOCheckQui)
                    .addComponent(TCOCheckSex)
                    .addComponent(TCOCheckSab)
                    .addComponent(TCOCheckDom))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(TelaCadastroOfertaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(TCOLabelHorario)
                    .addComponent(TCOCampoHorario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(7, 7, 7)
                .addGroup(TelaCadastroOfertaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(TCOCampoLocal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(TCOLabelLocal))
                .addGap(18, 18, 18)
                .addGroup(TelaCadastroOfertaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(TCOLabelDiretorioImagem, javax.swing.GroupLayout.DEFAULT_SIZE, 40, Short.MAX_VALUE)
                    .addComponent(TCOBotaoSelecionarImagem))
                .addGap(12, 12, 12)
                .addGroup(TelaCadastroOfertaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(TCOLabelAvisoObrigatorio)
                    .addComponent(TCOBotaoCadastro))
                .addContainerGap())
        );

        OfertaFileChooser.setDialogTitle("Escolha um arquivo");
        OfertaFileChooser.setFileFilter((javax.swing.filechooser.FileFilter)FiltroDeImagem);
        OfertaFileChooser.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                OfertaFileChooserActionPerformed(evt);
            }
        });

        TelaCompra.setTitle("Forma de Pagamento\n");
        TelaCompra.setAlwaysOnTop(true);
        TelaCompra.setMinimumSize(new java.awt.Dimension(289, 400));
        TelaCompra.setResizable(false);
        TelaCompra.addComponentListener(new java.awt.event.ComponentAdapter() {
            public void componentShown(java.awt.event.ComponentEvent evt) {
                TelaCompraComponentShown(evt);
            }
        });

        TCLabelFormaPagamento.setFont(new java.awt.Font("Ubuntu", 1, 17));
        TCLabelFormaPagamento.setText("Forma de Pagamento");

        TCRBotaoBoleto.setText("Boleto");
        TCRBotaoBoleto.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                TCRBotaoBoletoStateChanged(evt);
            }
        });

        TCRBotaoPayPal.setSelected(true);
        TCRBotaoPayPal.setText("PayPal");
        TCRBotaoPayPal.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                TCRBotaoPayPalStateChanged(evt);
            }
        });

        TCRBotaoCartao.setText("Cartão de Crédito");
        TCRBotaoCartao.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                TCRBotaoCartaoStateChanged(evt);
            }
        });

        TCComboBanco.setMaximumRowCount(1000);
        TCComboBanco.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Banco do Brasil", "Bradesco", "Caixa Federal", "Itaú", "Santander" }));
        TCComboBanco.setEnabled(false);

        TCCampoNro.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#0"))));
        TCCampoNro.setEnabled(false);

        TCLabelNro.setText("Número*");
        TCLabelNro.setEnabled(false);

        TCLabelCVC.setText("CVC*");
        TCLabelCVC.setEnabled(false);

        TCCampoCVC.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#0"))));
        TCCampoCVC.setEnabled(false);

        TCLabelBanco.setText("Banco*");
        TCLabelBanco.setEnabled(false);

        TCLabelValidade.setText("Validade*");
        TCLabelValidade.setEnabled(false);

        TCCampoValidade.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.DateFormatter(new java.text.SimpleDateFormat("yyyy-MM"))));
        TCCampoValidade.setEnabled(false);

        TCBotaoComprar.setText("Comprar");
        TCBotaoComprar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TCBotaoComprarActionPerformed(evt);
            }
        });

        TCLabelObrigatorio.setFont(new java.awt.Font("Ubuntu", 0, 13));
        TCLabelObrigatorio.setForeground(java.awt.Color.red);
        TCLabelObrigatorio.setText("*Campos obrigatórios");

        TCLabelFormato.setFont(new java.awt.Font("Ubuntu", 0, 13));
        TCLabelFormato.setForeground(javax.swing.UIManager.getDefaults().getColor("textHighlight"));
        TCLabelFormato.setText("aaaa-mm");
        TCLabelFormato.setToolTipText("ano-mês");
        TCLabelFormato.setEnabled(false);

        TCLabelLogin.setText("Login*");

        TCComboBandeira.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Visa", "MasterCard", "Hipercard" }));
        TCComboBandeira.setEnabled(false);

        TCLabelBandeira.setText("Bandeira*");
        TCLabelBandeira.setEnabled(false);

        TCLabelDigitos.setFont(new java.awt.Font("Ubuntu", 0, 13));
        TCLabelDigitos.setForeground(javax.swing.UIManager.getDefaults().getColor("textHighlight"));
        TCLabelDigitos.setText("3 dígitos");
        TCLabelDigitos.setEnabled(false);

        javax.swing.GroupLayout TelaCompraLayout = new javax.swing.GroupLayout(TelaCompra.getContentPane());
        TelaCompra.getContentPane().setLayout(TelaCompraLayout);
        TelaCompraLayout.setHorizontalGroup(
            TelaCompraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TelaCompraLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(TelaCompraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(TelaCompraLayout.createSequentialGroup()
                        .addComponent(TCLabelFormaPagamento)
                        .addContainerGap(103, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, TelaCompraLayout.createSequentialGroup()
                        .addComponent(TCLabelObrigatorio)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 59, Short.MAX_VALUE)
                        .addComponent(TCBotaoComprar)
                        .addContainerGap())
                    .addGroup(TelaCompraLayout.createSequentialGroup()
                        .addGap(12, 12, 12)
                        .addGroup(TelaCompraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(TelaCompraLayout.createSequentialGroup()
                                .addGap(12, 12, 12)
                                .addComponent(TCLabelLogin))
                            .addComponent(TCRBotaoPayPal))
                        .addContainerGap(194, Short.MAX_VALUE))))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, TelaCompraLayout.createSequentialGroup()
                .addGap(122, 122, 122)
                .addComponent(TCCampoLogin, javax.swing.GroupLayout.DEFAULT_SIZE, 155, Short.MAX_VALUE)
                .addContainerGap())
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, TelaCompraLayout.createSequentialGroup()
                .addGap(24, 24, 24)
                .addGroup(TelaCompraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(TCRBotaoBoleto)
                    .addComponent(TCRBotaoCartao)
                    .addGroup(TelaCompraLayout.createSequentialGroup()
                        .addGap(12, 12, 12)
                        .addGroup(TelaCompraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(TCLabelValidade)
                            .addComponent(TCLabelCVC)
                            .addComponent(TCLabelNro)
                            .addComponent(TCLabelBandeira))
                        .addGap(18, 18, 18)
                        .addGroup(TelaCompraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(TCCampoNro, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(TelaCompraLayout.createSequentialGroup()
                                .addComponent(TCCampoCVC, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 22, Short.MAX_VALUE)
                                .addComponent(TCLabelDigitos))
                            .addGroup(TelaCompraLayout.createSequentialGroup()
                                .addComponent(TCCampoValidade, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(TCLabelFormato))
                            .addComponent(TCComboBandeira, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(TelaCompraLayout.createSequentialGroup()
                        .addGap(12, 12, 12)
                        .addComponent(TCLabelBanco)
                        .addGap(35, 35, 35)
                        .addComponent(TCComboBanco, 0, 155, Short.MAX_VALUE)))
                .addContainerGap())
        );
        TelaCompraLayout.setVerticalGroup(
            TelaCompraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TelaCompraLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(TCLabelFormaPagamento)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(TCRBotaoPayPal)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(TelaCompraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(TCLabelLogin)
                    .addComponent(TCCampoLogin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(TCRBotaoBoleto)
                .addGap(7, 7, 7)
                .addGroup(TelaCompraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(TCLabelBanco)
                    .addComponent(TCComboBanco, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(TCRBotaoCartao)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(TelaCompraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(TCLabelNro)
                    .addComponent(TCCampoNro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(TelaCompraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(TCLabelCVC)
                    .addComponent(TCCampoCVC, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(TCLabelDigitos))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(TelaCompraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(TCLabelValidade)
                    .addComponent(TCCampoValidade, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(TCLabelFormato))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(TelaCompraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(TCComboBandeira, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(TCLabelBandeira))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 18, Short.MAX_VALUE)
                .addGroup(TelaCompraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(TCBotaoComprar)
                    .addComponent(TCLabelObrigatorio))
                .addContainerGap())
        );

        TelaRecomendacao.setTitle("Recomendação");
        TelaRecomendacao.setAlwaysOnTop(true);
        TelaRecomendacao.setMinimumSize(new java.awt.Dimension(350, 123));
        TelaRecomendacao.setResizable(false);

        TRBotaoOk.setText("Ok");
        TRBotaoOk.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TRBotaoOkActionPerformed(evt);
            }
        });

        TRLabelRecOferta.setFont(new java.awt.Font("Ubuntu", 1, 17));
        TRLabelRecOferta.setText("Usuário que lhe recomendou esta oferta");

        javax.swing.GroupLayout TelaRecomendacaoLayout = new javax.swing.GroupLayout(TelaRecomendacao.getContentPane());
        TelaRecomendacao.getContentPane().setLayout(TelaRecomendacaoLayout);
        TelaRecomendacaoLayout.setHorizontalGroup(
            TelaRecomendacaoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TelaRecomendacaoLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(TelaRecomendacaoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(TRBotaoOk)
                    .addGroup(TelaRecomendacaoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addGroup(TelaRecomendacaoLayout.createSequentialGroup()
                            .addGap(12, 12, 12)
                            .addComponent(TRComboUsuarios, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addComponent(TRLabelRecOferta, javax.swing.GroupLayout.Alignment.LEADING)))
                .addContainerGap())
        );
        TelaRecomendacaoLayout.setVerticalGroup(
            TelaRecomendacaoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TelaRecomendacaoLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(TRLabelRecOferta)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(TRComboUsuarios, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(TRBotaoOk)
                .addContainerGap(20, Short.MAX_VALUE))
        );

        TelaCadastroProduto.setTitle("Cadastro de Oferta");
        TelaCadastroProduto.setAlwaysOnTop(true);
        TelaCadastroProduto.setLocationByPlatform(true);
        TelaCadastroProduto.setMinimumSize(new java.awt.Dimension(410, 431));
        TelaCadastroProduto.setResizable(false);
        TelaCadastroProduto.addComponentListener(new java.awt.event.ComponentAdapter() {
            public void componentShown(java.awt.event.ComponentEvent evt) {
                TelaCadastroProdutoComponentShown(evt);
            }
        });

        TCPLabelValor.setText("Valor*");

        TCPLabelDados.setFont(new java.awt.Font("Ubuntu", 1, 17));
        TCPLabelDados.setText("Dados do produto");

        TCPBotaoCadastro.setText("Cadastrar");
        TCPBotaoCadastro.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TCPBotaoCadastroActionPerformed(evt);
            }
        });

        TCPLabelAvisoObrigatorio.setFont(new java.awt.Font("Ubuntu", 0, 13));
        TCPLabelAvisoObrigatorio.setForeground(java.awt.Color.red);
        TCPLabelAvisoObrigatorio.setText("*Todos os campos são obrigatórios");

        TCPBotaoSelecionarImagem.setText("Selecionar Imagem");
        TCPBotaoSelecionarImagem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TCPBotaoSelecionarImagemActionPerformed(evt);
            }
        });

        TCPLabelDiretorioImagem.setFont(new java.awt.Font("Ubuntu", 0, 14));

        TCPCampoValor.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#0.00;#0"))));

        TCPLabelValorRS.setText("R$");

        TCPLabelDescricao.setText("Descricao");

        TCPLabelTipo.setText("Tipo*");

        TCPRBServico.setText("Serviço");
        TCPRBServico.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TCPRBServicoActionPerformed(evt);
            }
        });

        TCPRBFisico.setSelected(true);
        TCPRBFisico.setText("Físico");
        TCPRBFisico.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TCPRBFisicoActionPerformed(evt);
            }
        });

        TCPLabelEmpresa.setText("Empresa  Cadastrante*");

        TCPAreaDescricao.setBackground(java.awt.Color.white);
        jScrollPane5.setViewportView(TCPAreaDescricao);

        TCPComboEmpresaCad.setModel(new javax.swing.DefaultComboBoxModel(new String[] { " " }));

        javax.swing.GroupLayout TelaCadastroProdutoLayout = new javax.swing.GroupLayout(TelaCadastroProduto.getContentPane());
        TelaCadastroProduto.getContentPane().setLayout(TelaCadastroProdutoLayout);
        TelaCadastroProdutoLayout.setHorizontalGroup(
            TelaCadastroProdutoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TelaCadastroProdutoLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(TelaCadastroProdutoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(TelaCadastroProdutoLayout.createSequentialGroup()
                        .addGroup(TelaCadastroProdutoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(TCPLabelDados, javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, TelaCadastroProdutoLayout.createSequentialGroup()
                                .addGap(12, 12, 12)
                                .addGroup(TelaCadastroProdutoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addGroup(TelaCadastroProdutoLayout.createSequentialGroup()
                                        .addGap(12, 12, 12)
                                        .addComponent(jScrollPane5, 0, 0, Short.MAX_VALUE))
                                    .addComponent(TCPLabelDescricao)
                                    .addGroup(TelaCadastroProdutoLayout.createSequentialGroup()
                                        .addComponent(TCPLabelValor)
                                        .addGap(18, 18, 18)
                                        .addComponent(TCPLabelValorRS)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(TCPCampoValor, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(TelaCadastroProdutoLayout.createSequentialGroup()
                                        .addComponent(TCPLabelTipo)
                                        .addGap(42, 42, 42)
                                        .addComponent(TCPRBFisico)
                                        .addGap(18, 18, 18)
                                        .addComponent(TCPRBServico))
                                    .addComponent(TCPLabelEmpresa)
                                    .addGroup(TelaCadastroProdutoLayout.createSequentialGroup()
                                        .addGap(12, 12, 12)
                                        .addComponent(TCPComboEmpresaCad, 0, 345, Short.MAX_VALUE)))))
                        .addContainerGap(29, Short.MAX_VALUE))
                    .addGroup(TelaCadastroProdutoLayout.createSequentialGroup()
                        .addGroup(TelaCadastroProdutoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(TelaCadastroProdutoLayout.createSequentialGroup()
                                .addGap(12, 12, 12)
                                .addComponent(TCPLabelDiretorioImagem, javax.swing.GroupLayout.DEFAULT_SIZE, 357, Short.MAX_VALUE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 8, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(TelaCadastroProdutoLayout.createSequentialGroup()
                                .addComponent(TCPLabelAvisoObrigatorio)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 85, Short.MAX_VALUE)
                                .addComponent(TCPBotaoCadastro))
                            .addGroup(TelaCadastroProdutoLayout.createSequentialGroup()
                                .addComponent(TCPBotaoSelecionarImagem)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 234, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(21, 21, 21))))
        );
        TelaCadastroProdutoLayout.setVerticalGroup(
            TelaCadastroProdutoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TelaCadastroProdutoLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(TCPLabelDados)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(TelaCadastroProdutoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(TCPLabelValor)
                    .addComponent(TCPLabelValorRS)
                    .addComponent(TCPCampoValor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(TCPLabelDescricao)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(TelaCadastroProdutoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(TCPLabelTipo)
                    .addComponent(TCPRBFisico)
                    .addComponent(TCPRBServico))
                .addGap(12, 12, 12)
                .addComponent(TCPLabelEmpresa)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(TCPComboEmpresaCad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(TCPBotaoSelecionarImagem)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(TCPLabelDiretorioImagem, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(TelaCadastroProdutoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(TCPLabelAvisoObrigatorio)
                    .addComponent(TCPBotaoCadastro))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        ProdutoFileChooser.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ProdutoFileChooserActionPerformed(evt);
            }
        });

        setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
        setTitle("GrUSPon");
        setLocationByPlatform(true);
        setMinimumSize(new java.awt.Dimension(803, 716));
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosing(java.awt.event.WindowEvent evt) {
                JFrameWindowClosing(evt);
            }
        });

        BarraCreditos.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        javax.swing.GroupLayout BarraCreditosLayout = new javax.swing.GroupLayout(BarraCreditos);
        BarraCreditos.setLayout(BarraCreditosLayout);
        BarraCreditosLayout.setHorizontalGroup(
            BarraCreditosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 777, Short.MAX_VALUE)
        );
        BarraCreditosLayout.setVerticalGroup(
            BarraCreditosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 41, Short.MAX_VALUE)
        );

        BarraLogin.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        BLBotaoCadastro.setText("Cadastre-se");
        BLBotaoCadastro.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BLBotaoCadastroActionPerformed(evt);
            }
        });

        BLBotaoLogin.setText("Login ");
        BLBotaoLogin.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BLBotaoLoginActionPerformed(evt);
            }
        });

        BLLabelSaudacao.setText("Olá,");

        BLLabelUsuario.setText("Visitante");

        javax.swing.GroupLayout BarraLoginLayout = new javax.swing.GroupLayout(BarraLogin);
        BarraLogin.setLayout(BarraLoginLayout);
        BarraLoginLayout.setHorizontalGroup(
            BarraLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, BarraLoginLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(BLLabelSaudacao)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(BLLabelUsuario)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 291, Short.MAX_VALUE)
                .addComponent(BLLabelCreditos, javax.swing.GroupLayout.PREFERRED_SIZE, 158, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(BLBotaoCadastro)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(BLBotaoLogin, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(21, 21, 21))
        );
        BarraLoginLayout.setVerticalGroup(
            BarraLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(BarraLoginLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(BarraLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(BLLabelSaudacao)
                    .addComponent(BLLabelUsuario)
                    .addComponent(BLBotaoLogin)
                    .addComponent(BLBotaoCadastro)
                    .addComponent(BLLabelCreditos))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        PainelDeFundo.setLayout(new java.awt.CardLayout());

        TelaInicial.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        TIOpcoes.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        TIOBotaoMaisOfertas.setText("Mais ofertas");
        TIOBotaoMaisOfertas.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TIOBotaoMaisOfertasActionPerformed(evt);
            }
        });

        TIOBotaoOfertasAnteriores.setText("Ofertas Anteriores");
        TIOBotaoOfertasAnteriores.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TIOBotaoOfertasAnterioresActionPerformed(evt);
            }
        });

        TIOLabelGruspon.setText("GrUSPon");

        javax.swing.GroupLayout TIOpcoesLayout = new javax.swing.GroupLayout(TIOpcoes);
        TIOpcoes.setLayout(TIOpcoesLayout);
        TIOpcoesLayout.setHorizontalGroup(
            TIOpcoesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TIOpcoesLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(TIOpcoesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(TIOLabelGruspon, javax.swing.GroupLayout.DEFAULT_SIZE, 149, Short.MAX_VALUE)
                    .addComponent(TIOBotaoMaisOfertas, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 149, Short.MAX_VALUE)
                    .addComponent(TIOBotaoOfertasAnteriores, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 149, Short.MAX_VALUE)
                    .addComponent(TIOLabelNaoMaisOfertas, javax.swing.GroupLayout.DEFAULT_SIZE, 149, Short.MAX_VALUE))
                .addContainerGap())
        );
        TIOpcoesLayout.setVerticalGroup(
            TIOpcoesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TIOpcoesLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(TIOLabelGruspon, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(TIOBotaoMaisOfertas)
                .addGap(18, 18, 18)
                .addComponent(TIOBotaoOfertasAnteriores)
                .addGap(18, 18, 18)
                .addComponent(TIOLabelNaoMaisOfertas, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(325, Short.MAX_VALUE))
        );

        TIMostruario.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        TIMostruario.setMaximumSize(new java.awt.Dimension(572, 563));
        TIMostruario.setMinimumSize(new java.awt.Dimension(572, 563));
        TIMostruario.setPreferredSize(new java.awt.Dimension(572, 563));
        TIMostruario.addComponentListener(new java.awt.event.ComponentAdapter() {
            public void componentShown(java.awt.event.ComponentEvent evt) {
                TIMostruarioComponentShown(evt);
            }
        });

        TIMLabelIDProduto.setText("ID do Produto");

        TIMLabelDescricao.setFont(new java.awt.Font("Ubuntu", 1, 19));
        TIMLabelDescricao.setText("Descrição");

        TIMAreaDescricao.setColumns(20);
        TIMAreaDescricao.setEditable(false);
        TIMAreaDescricao.setRows(5);
        TIMAreaDescricao.setTabSize(4);
        TIMAreaDescricao.setMinimumSize(new java.awt.Dimension(260, 90));
        TIMAreaDescricao.setOpaque(false);
        TIMPainelDescricao.setViewportView(TIMAreaDescricao);

        TIMLabelNroOferta.setText("Nro. da Oferta");

        TIMLabelnformacoes.setFont(new java.awt.Font("Ubuntu", 1, 18));
        TIMLabelnformacoes.setText("Informações");

        TIMLabelValorOriginal.setText("Valor Original");

        TIMLabelValorPromocional.setText("Valor Promocional");

        TIMPanelImage.setBorder(null);
        TIMPanelImage.setPreferredSize(new java.awt.Dimension(343, 321));

        javax.swing.GroupLayout TIMPanelImageLayout = new javax.swing.GroupLayout(TIMPanelImage);
        TIMPanelImage.setLayout(TIMPanelImageLayout);
        TIMPanelImageLayout.setHorizontalGroup(
            TIMPanelImageLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(TIMLabelImage, javax.swing.GroupLayout.DEFAULT_SIZE, 343, Short.MAX_VALUE)
        );
        TIMPanelImageLayout.setVerticalGroup(
            TIMPanelImageLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(TIMLabelImage, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 321, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout TIMostruarioLayout = new javax.swing.GroupLayout(TIMostruario);
        TIMostruario.setLayout(TIMostruarioLayout);
        TIMostruarioLayout.setHorizontalGroup(
            TIMostruarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TIMostruarioLayout.createSequentialGroup()
                .addGroup(TIMostruarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(TIMostruarioLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(TIMLabelDescricao))
                    .addGroup(TIMostruarioLayout.createSequentialGroup()
                        .addGap(24, 24, 24)
                        .addComponent(TIMPainelDescricao, javax.swing.GroupLayout.PREFERRED_SIZE, 524, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(TIMostruarioLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(TIMPanelImage, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addGroup(TIMostruarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(TIMLabelnformacoes)
                            .addGroup(TIMostruarioLayout.createSequentialGroup()
                                .addGap(32, 32, 32)
                                .addGroup(TIMostruarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(TIMLabelIDProduto)
                                    .addComponent(TIMLabelNroOferta)
                                    .addComponent(TIMLabelValorOriginal)
                                    .addGroup(TIMostruarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, TIMostruarioLayout.createSequentialGroup()
                                            .addGap(12, 12, 12)
                                            .addComponent(TIMLabelVIDProduto, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, TIMostruarioLayout.createSequentialGroup()
                                            .addGap(12, 12, 12)
                                            .addComponent(TIMLabelVValorOri, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, TIMostruarioLayout.createSequentialGroup()
                                            .addGap(12, 12, 12)
                                            .addComponent(TIMLabelVNroOferta, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                        .addComponent(TIMLabelValorPromocional)
                                        .addGroup(TIMostruarioLayout.createSequentialGroup()
                                            .addGap(12, 12, 12)
                                            .addComponent(TIMLabelVValorPromo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))))))
                .addContainerGap(22, Short.MAX_VALUE))
        );
        TIMostruarioLayout.setVerticalGroup(
            TIMostruarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TIMostruarioLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(TIMostruarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(TIMostruarioLayout.createSequentialGroup()
                        .addComponent(TIMLabelnformacoes)
                        .addGap(18, 18, 18)
                        .addComponent(TIMLabelIDProduto)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TIMLabelVIDProduto, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(TIMLabelNroOferta)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TIMLabelVNroOferta, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(TIMLabelValorOriginal)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TIMLabelVValorOri, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(TIMLabelValorPromocional)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TIMLabelVValorPromo, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(65, 65, 65))
                    .addGroup(TIMostruarioLayout.createSequentialGroup()
                        .addComponent(TIMPanelImage, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)))
                .addComponent(TIMLabelDescricao)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(TIMPainelDescricao, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(36, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout TelaInicialLayout = new javax.swing.GroupLayout(TelaInicial);
        TelaInicial.setLayout(TelaInicialLayout);
        TelaInicialLayout.setHorizontalGroup(
            TelaInicialLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, TelaInicialLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(TIOpcoes, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(TIMostruario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        TelaInicialLayout.setVerticalGroup(
            TelaInicialLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TelaInicialLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(TelaInicialLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(TIOpcoes, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(TIMostruario, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 564, Short.MAX_VALUE))
                .addContainerGap())
        );

        PainelDeFundo.add(TelaInicial, "inicial");

        TelaAdmin.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        TelaAdmin.setMaximumSize(new java.awt.Dimension(785, 590));
        TelaAdmin.setMinimumSize(new java.awt.Dimension(785, 590));
        TelaAdmin.setRequestFocusEnabled(false);

        TAOpcoes.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        TALabelGruspon.setText("GrUSPon");

        TAOBotaoAtualizar.setText("Atualizar");
        TAOBotaoAtualizar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TAOBotaoAtualizarActionPerformed(evt);
            }
        });

        jButton1.setText("Cadastrar Produto");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout TAOpcoesLayout = new javax.swing.GroupLayout(TAOpcoes);
        TAOpcoes.setLayout(TAOpcoesLayout);
        TAOpcoesLayout.setHorizontalGroup(
            TAOpcoesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TAOpcoesLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(TAOpcoesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(TAOBotaoAtualizar, javax.swing.GroupLayout.DEFAULT_SIZE, 149, Short.MAX_VALUE)
                    .addComponent(TALabelGruspon, javax.swing.GroupLayout.DEFAULT_SIZE, 149, Short.MAX_VALUE)
                    .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, 149, Short.MAX_VALUE))
                .addContainerGap())
        );
        TAOpcoesLayout.setVerticalGroup(
            TAOpcoesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TAOpcoesLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(TALabelGruspon, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(TAOBotaoAtualizar)
                .addGap(18, 18, 18)
                .addComponent(jButton1)
                .addContainerGap(373, Short.MAX_VALUE))
        );

        TAMostruario.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        TAMostruario.setLayout(new java.awt.CardLayout());

        TAPainelProdutos.setMaximumSize(new java.awt.Dimension(566, 526));
        TAPainelProdutos.setMinimumSize(new java.awt.Dimension(566, 526));

        TAPBotaoProximo.setText("Próxima Página");
        TAPBotaoProximo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TAPBotaoProximoActionPerformed(evt);
            }
        });

        TAPBotaoAnterior.setText("Página Anterior");
        TAPBotaoAnterior.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TAPBotaoAnteriorActionPerformed(evt);
            }
        });

        TAPPainelBR.setBorder(null);
        TAPPainelBR.setMaximumSize(new java.awt.Dimension(258, 221));
        TAPPainelBR.setMinimumSize(new java.awt.Dimension(258, 221));

        TAPBRLabelIDProduto.setFont(new java.awt.Font("Ubuntu", 0, 14));
        TAPBRLabelIDProduto.setText("ID do Produto");

        TAPBRLabelVIDProduto.setFont(new java.awt.Font("Ubuntu", 0, 14));
        TAPBRLabelVIDProduto.setText("ID");

        TAPBRLabelEmpresa.setFont(new java.awt.Font("Ubuntu", 0, 14));
        TAPBRLabelEmpresa.setText("Empresa");

        TAPBRLabelVEmpresa.setFont(new java.awt.Font("Ubuntu", 0, 14));
        TAPBRLabelVEmpresa.setText("emp");

        TAPBRLabelValor.setFont(new java.awt.Font("Ubuntu", 0, 14));
        TAPBRLabelValor.setText("Valor");

        TAPBRLabelVValor.setFont(new java.awt.Font("Ubuntu", 0, 14));
        TAPBRLabelVValor.setText("val");

        TAPBRLBotaoCadastro.setFont(new java.awt.Font("Ubuntu", 0, 13));
        TAPBRLBotaoCadastro.setText("Cadastrar Oferta");
        TAPBRLBotaoCadastro.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TAPBotaoCadastraOferta(evt);
            }
        });

        TAPBRLabelVTipo.setFont(new java.awt.Font("Ubuntu", 0, 14));
        TAPBRLabelVTipo.setText("S");

        jScrollPane4.setViewportView(jTextPane4);

        TAPBRBotaoAlteraFoto.setText("Alterar Foto");
        TAPBRBotaoAlteraFoto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TAPTLBotaoAlteraFotoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout TAPPainelBRLayout = new javax.swing.GroupLayout(TAPPainelBR);
        TAPPainelBR.setLayout(TAPPainelBRLayout);
        TAPPainelBRLayout.setHorizontalGroup(
            TAPPainelBRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TAPPainelBRLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(TAPPainelBRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(TAPPainelBRLayout.createSequentialGroup()
                        .addComponent(TAPBRLabelImagem, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(12, 12, 12)
                        .addGroup(TAPPainelBRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(TAPPainelBRLayout.createSequentialGroup()
                                .addComponent(TAPBRLabelValor)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(TAPBRLabelVValor))
                            .addGroup(TAPPainelBRLayout.createSequentialGroup()
                                .addGap(12, 12, 12)
                                .addComponent(TAPBRLabelVEmpresa))
                            .addComponent(TAPBRLabelEmpresa)
                            .addGroup(TAPPainelBRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addGroup(javax.swing.GroupLayout.Alignment.LEADING, TAPPainelBRLayout.createSequentialGroup()
                                    .addGap(12, 12, 12)
                                    .addComponent(TAPBRLabelVIDProduto)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(TAPBRLabelVTipo))
                                .addComponent(TAPBRLabelIDProduto, javax.swing.GroupLayout.Alignment.LEADING))))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, TAPPainelBRLayout.createSequentialGroup()
                        .addComponent(TAPBRBotaoAlteraFoto, javax.swing.GroupLayout.DEFAULT_SIZE, 104, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(TAPBRLBotaoCadastro))
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 232, Short.MAX_VALUE))
                .addContainerGap())
        );
        TAPPainelBRLayout.setVerticalGroup(
            TAPPainelBRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TAPPainelBRLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(TAPPainelBRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(TAPBRLabelImagem, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(TAPPainelBRLayout.createSequentialGroup()
                        .addComponent(TAPBRLabelIDProduto)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(TAPPainelBRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(TAPBRLabelVIDProduto)
                            .addComponent(TAPBRLabelVTipo))
                        .addGap(6, 6, 6)
                        .addComponent(TAPBRLabelEmpresa)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TAPBRLabelVEmpresa)
                        .addGap(7, 7, 7)
                        .addGroup(TAPPainelBRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(TAPBRLabelValor)
                            .addComponent(TAPBRLabelVValor))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 11, Short.MAX_VALUE)
                .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(TAPPainelBRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(TAPBRLBotaoCadastro)
                    .addComponent(TAPBRBotaoAlteraFoto))
                .addContainerGap())
        );

        TAPPainelTR.setBorder(null);
        TAPPainelTR.setMaximumSize(new java.awt.Dimension(258, 221));
        TAPPainelTR.setMinimumSize(new java.awt.Dimension(258, 221));

        TAPTRLabelIDProduto.setFont(new java.awt.Font("Ubuntu", 0, 14));
        TAPTRLabelIDProduto.setText("ID do Produto");

        TAPTRLabelVIDProduto.setFont(new java.awt.Font("Ubuntu", 0, 14));
        TAPTRLabelVIDProduto.setText("ID");

        TAPTRLabelEmpresa.setFont(new java.awt.Font("Ubuntu", 0, 14));
        TAPTRLabelEmpresa.setText("Empresa");

        TAPTRLabelVEmpresa.setFont(new java.awt.Font("Ubuntu", 0, 14));
        TAPTRLabelVEmpresa.setText("emp");

        TAPTRLabelValor.setFont(new java.awt.Font("Ubuntu", 0, 14));
        TAPTRLabelValor.setText("Valor");

        TAPTRLabelVValor.setFont(new java.awt.Font("Ubuntu", 0, 14));
        TAPTRLabelVValor.setText("val");

        TAPTRLBotaoCadastro.setFont(new java.awt.Font("Ubuntu", 0, 13));
        TAPTRLBotaoCadastro.setText("Cadastrar Oferta");
        TAPTRLBotaoCadastro.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TAPBotaoCadastraOferta(evt);
            }
        });

        TAPTRLabelVTipo.setFont(new java.awt.Font("Ubuntu", 0, 14));
        TAPTRLabelVTipo.setText("S");

        jScrollPane2.setViewportView(TAPTRCampoDescricao);

        TAPTRBotaoAlteraFoto.setText("Alterar Foto");
        TAPTRBotaoAlteraFoto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TAPTLBotaoAlteraFotoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout TAPPainelTRLayout = new javax.swing.GroupLayout(TAPPainelTR);
        TAPPainelTR.setLayout(TAPPainelTRLayout);
        TAPPainelTRLayout.setHorizontalGroup(
            TAPPainelTRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TAPPainelTRLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(TAPPainelTRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(TAPPainelTRLayout.createSequentialGroup()
                        .addComponent(TAPTRLabelImagem, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(12, 12, 12)
                        .addGroup(TAPPainelTRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(TAPPainelTRLayout.createSequentialGroup()
                                .addComponent(TAPTRLabelValor)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(TAPTRLabelVValor))
                            .addGroup(TAPPainelTRLayout.createSequentialGroup()
                                .addGap(12, 12, 12)
                                .addComponent(TAPTRLabelVEmpresa))
                            .addComponent(TAPTRLabelEmpresa)
                            .addGroup(TAPPainelTRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addGroup(javax.swing.GroupLayout.Alignment.LEADING, TAPPainelTRLayout.createSequentialGroup()
                                    .addGap(12, 12, 12)
                                    .addComponent(TAPTRLabelVIDProduto)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(TAPTRLabelVTipo))
                                .addComponent(TAPTRLabelIDProduto, javax.swing.GroupLayout.Alignment.LEADING))))
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 232, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, TAPPainelTRLayout.createSequentialGroup()
                        .addComponent(TAPTRBotaoAlteraFoto, javax.swing.GroupLayout.DEFAULT_SIZE, 104, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(TAPTRLBotaoCadastro)))
                .addContainerGap())
        );
        TAPPainelTRLayout.setVerticalGroup(
            TAPPainelTRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TAPPainelTRLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(TAPPainelTRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(TAPTRLabelImagem, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(TAPPainelTRLayout.createSequentialGroup()
                        .addComponent(TAPTRLabelIDProduto)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(TAPPainelTRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(TAPTRLabelVIDProduto)
                            .addComponent(TAPTRLabelVTipo))
                        .addGap(6, 6, 6)
                        .addComponent(TAPTRLabelEmpresa)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TAPTRLabelVEmpresa)
                        .addGap(7, 7, 7)
                        .addGroup(TAPPainelTRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(TAPTRLabelValor)
                            .addComponent(TAPTRLabelVValor))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 10, Short.MAX_VALUE)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(TAPPainelTRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(TAPTRLBotaoCadastro)
                    .addComponent(TAPTRBotaoAlteraFoto))
                .addContainerGap())
        );

        TAPPainelTL.setBorder(null);
        TAPPainelTL.setMaximumSize(new java.awt.Dimension(258, 221));
        TAPPainelTL.setMinimumSize(new java.awt.Dimension(258, 221));

        TAPTLLabelIDProduto.setFont(new java.awt.Font("Ubuntu", 0, 14));
        TAPTLLabelIDProduto.setText("ID do Produto");

        TAPTLLabelVIDProduto.setFont(new java.awt.Font("Ubuntu", 0, 14));
        TAPTLLabelVIDProduto.setText("ID");

        TAPTLLabelEmpresa.setFont(new java.awt.Font("Ubuntu", 0, 14));
        TAPTLLabelEmpresa.setText("Empresa");

        TAPTLLabelVEmpresa.setFont(new java.awt.Font("Ubuntu", 0, 14));
        TAPTLLabelVEmpresa.setText("emp");

        TAPTLLabelValor.setFont(new java.awt.Font("Ubuntu", 0, 14));
        TAPTLLabelValor.setText("Valor");

        TAPTLLabelVValor.setFont(new java.awt.Font("Ubuntu", 0, 14));
        TAPTLLabelVValor.setText("val");

        TAPTLLBotaoCadastro.setFont(new java.awt.Font("Ubuntu", 0, 13));
        TAPTLLBotaoCadastro.setText("Cadastrar Oferta");
        TAPTLLBotaoCadastro.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TAPBotaoCadastraOferta(evt);
            }
        });

        TAPTLLabelVTipo.setFont(new java.awt.Font("Ubuntu", 0, 14));
        TAPTLLabelVTipo.setText("S");

        TAPTLCampoDescricao.setEditable(false);
        jScrollPane1.setViewportView(TAPTLCampoDescricao);

        TAPTLBotaoAlteraFoto.setText("Alterar Foto");
        TAPTLBotaoAlteraFoto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TAPTLBotaoAlteraFotoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout TAPPainelTLLayout = new javax.swing.GroupLayout(TAPPainelTL);
        TAPPainelTL.setLayout(TAPPainelTLLayout);
        TAPPainelTLLayout.setHorizontalGroup(
            TAPPainelTLLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, TAPPainelTLLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(TAPPainelTLLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(TAPPainelTLLayout.createSequentialGroup()
                        .addComponent(TAPTLBotaoAlteraFoto, javax.swing.GroupLayout.DEFAULT_SIZE, 104, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(TAPTLLBotaoCadastro))
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 232, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, TAPPainelTLLayout.createSequentialGroup()
                        .addComponent(TAPTLLabelImagem, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(TAPPainelTLLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(TAPPainelTLLayout.createSequentialGroup()
                                .addComponent(TAPTLLabelValor)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(TAPTLLabelVValor))
                            .addGroup(TAPPainelTLLayout.createSequentialGroup()
                                .addGap(12, 12, 12)
                                .addComponent(TAPTLLabelVEmpresa))
                            .addComponent(TAPTLLabelEmpresa)
                            .addGroup(TAPPainelTLLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addGroup(javax.swing.GroupLayout.Alignment.LEADING, TAPPainelTLLayout.createSequentialGroup()
                                    .addGap(12, 12, 12)
                                    .addComponent(TAPTLLabelVIDProduto)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(TAPTLLabelVTipo))
                                .addComponent(TAPTLLabelIDProduto, javax.swing.GroupLayout.Alignment.LEADING)))))
                .addContainerGap())
        );
        TAPPainelTLLayout.setVerticalGroup(
            TAPPainelTLLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TAPPainelTLLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(TAPPainelTLLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(TAPTLLabelImagem, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(TAPPainelTLLayout.createSequentialGroup()
                        .addComponent(TAPTLLabelIDProduto)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(TAPPainelTLLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(TAPTLLabelVIDProduto)
                            .addComponent(TAPTLLabelVTipo))
                        .addGap(6, 6, 6)
                        .addComponent(TAPTLLabelEmpresa)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TAPTLLabelVEmpresa)
                        .addGap(7, 7, 7)
                        .addGroup(TAPPainelTLLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(TAPTLLabelValor)
                            .addComponent(TAPTLLabelVValor))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(TAPPainelTLLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(TAPTLLBotaoCadastro)
                    .addComponent(TAPTLBotaoAlteraFoto))
                .addGap(19, 19, 19))
        );

        TAPPainelBL.setBorder(null);
        TAPPainelBL.setMaximumSize(new java.awt.Dimension(258, 221));
        TAPPainelBL.setMinimumSize(new java.awt.Dimension(258, 221));

        TAPBLLabelIDProduto.setFont(new java.awt.Font("Ubuntu", 0, 14));
        TAPBLLabelIDProduto.setText("ID do Produto");

        TAPBLLabelVIDProduto.setFont(new java.awt.Font("Ubuntu", 0, 14));
        TAPBLLabelVIDProduto.setText("ID");

        TAPBLLabelEmpresa.setFont(new java.awt.Font("Ubuntu", 0, 14));
        TAPBLLabelEmpresa.setText("Empresa");

        TAPBLLabelVEmpresa.setFont(new java.awt.Font("Ubuntu", 0, 14));
        TAPBLLabelVEmpresa.setText("emp");

        TAPBLLabelValor.setFont(new java.awt.Font("Ubuntu", 0, 14));
        TAPBLLabelValor.setText("Valor");

        TAPBLLabelVValor.setFont(new java.awt.Font("Ubuntu", 0, 14));
        TAPBLLabelVValor.setText("val");

        TAPBLLBotaoCadastro.setFont(new java.awt.Font("Ubuntu", 0, 13));
        TAPBLLBotaoCadastro.setText("Cadastrar Oferta");
        TAPBLLBotaoCadastro.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TAPBotaoCadastraOferta(evt);
            }
        });

        TAPBLLabelVTipo.setFont(new java.awt.Font("Ubuntu", 0, 14));
        TAPBLLabelVTipo.setText("S");

        jScrollPane3.setViewportView(jTextPane3);

        TAPBLBotaoAlteraFoto.setText("Alterar Foto");
        TAPBLBotaoAlteraFoto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TAPTLBotaoAlteraFotoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout TAPPainelBLLayout = new javax.swing.GroupLayout(TAPPainelBL);
        TAPPainelBL.setLayout(TAPPainelBLLayout);
        TAPPainelBLLayout.setHorizontalGroup(
            TAPPainelBLLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TAPPainelBLLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(TAPPainelBLLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(TAPPainelBLLayout.createSequentialGroup()
                        .addComponent(TAPBLLabelImagem, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(12, 12, 12)
                        .addGroup(TAPPainelBLLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(TAPPainelBLLayout.createSequentialGroup()
                                .addComponent(TAPBLLabelValor)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(TAPBLLabelVValor))
                            .addGroup(TAPPainelBLLayout.createSequentialGroup()
                                .addGap(12, 12, 12)
                                .addComponent(TAPBLLabelVEmpresa))
                            .addComponent(TAPBLLabelEmpresa)
                            .addGroup(TAPPainelBLLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addGroup(javax.swing.GroupLayout.Alignment.LEADING, TAPPainelBLLayout.createSequentialGroup()
                                    .addGap(12, 12, 12)
                                    .addComponent(TAPBLLabelVIDProduto)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(TAPBLLabelVTipo))
                                .addComponent(TAPBLLabelIDProduto, javax.swing.GroupLayout.Alignment.LEADING))))
                    .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 232, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, TAPPainelBLLayout.createSequentialGroup()
                        .addComponent(TAPBLBotaoAlteraFoto, javax.swing.GroupLayout.DEFAULT_SIZE, 104, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(TAPBLLBotaoCadastro)))
                .addContainerGap())
        );
        TAPPainelBLLayout.setVerticalGroup(
            TAPPainelBLLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TAPPainelBLLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(TAPPainelBLLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(TAPBLLabelImagem, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(TAPPainelBLLayout.createSequentialGroup()
                        .addComponent(TAPBLLabelIDProduto)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(TAPPainelBLLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(TAPBLLabelVIDProduto)
                            .addComponent(TAPBLLabelVTipo))
                        .addGap(6, 6, 6)
                        .addComponent(TAPBLLabelEmpresa)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TAPBLLabelVEmpresa)
                        .addGap(7, 7, 7)
                        .addGroup(TAPPainelBLLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(TAPBLLabelValor)
                            .addComponent(TAPBLLabelVValor))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 11, Short.MAX_VALUE)
                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(TAPPainelBLLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(TAPBLLBotaoCadastro)
                    .addComponent(TAPBLBotaoAlteraFoto))
                .addContainerGap())
        );

        javax.swing.GroupLayout TAPainelProdutosLayout = new javax.swing.GroupLayout(TAPainelProdutos);
        TAPainelProdutos.setLayout(TAPainelProdutosLayout);
        TAPainelProdutosLayout.setHorizontalGroup(
            TAPainelProdutosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TAPainelProdutosLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(TAPainelProdutosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, TAPainelProdutosLayout.createSequentialGroup()
                        .addComponent(TAPBotaoAnterior)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(TAPBotaoProximo))
                    .addGroup(TAPainelProdutosLayout.createSequentialGroup()
                        .addGroup(TAPainelProdutosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(TAPPainelBL, javax.swing.GroupLayout.PREFERRED_SIZE, 256, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(TAPPainelTL, javax.swing.GroupLayout.PREFERRED_SIZE, 256, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 34, Short.MAX_VALUE)
                        .addGroup(TAPainelProdutosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(TAPPainelTR, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 256, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(TAPPainelBR, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 256, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap())
        );
        TAPainelProdutosLayout.setVerticalGroup(
            TAPainelProdutosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TAPainelProdutosLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(TAPainelProdutosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(TAPPainelTL, javax.swing.GroupLayout.PREFERRED_SIZE, 226, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(TAPPainelTR, javax.swing.GroupLayout.PREFERRED_SIZE, 219, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(51, 51, 51)
                .addGroup(TAPainelProdutosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(TAPPainelBL, 0, 220, Short.MAX_VALUE)
                    .addComponent(TAPPainelBR, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(TAPainelProdutosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(TAPBotaoAnterior)
                    .addComponent(TAPBotaoProximo))
                .addContainerGap())
        );

        TAMostruario.add(TAPainelProdutos, "produto");

        javax.swing.GroupLayout TelaAdminLayout = new javax.swing.GroupLayout(TelaAdmin);
        TelaAdmin.setLayout(TelaAdminLayout);
        TelaAdminLayout.setHorizontalGroup(
            TelaAdminLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, TelaAdminLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(TAOpcoes, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(TAMostruario, javax.swing.GroupLayout.PREFERRED_SIZE, 572, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        TelaAdminLayout.setVerticalGroup(
            TelaAdminLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TelaAdminLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(TelaAdminLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(TAOpcoes, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(TAMostruario, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 564, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        PainelDeFundo.add(TelaAdmin, "admin");

        TelaUsuario.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        TUPainelDeFundo.setBorder(null);
        TUPainelDeFundo.setMaximumSize(new java.awt.Dimension(574, 564));
        TUPainelDeFundo.setMinimumSize(new java.awt.Dimension(574, 564));
        TUPainelDeFundo.setLayout(new java.awt.CardLayout());

        TUMostruario.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        TUMostruario.setMaximumSize(new java.awt.Dimension(572, 563));
        TUMostruario.setMinimumSize(new java.awt.Dimension(572, 563));
        TUMostruario.addComponentListener(new java.awt.event.ComponentAdapter() {
            public void componentShown(java.awt.event.ComponentEvent evt) {
                TUMostruarioComponentShown(evt);
            }
        });

        TUMPainelImagem.setBorder(null);
        TUMPainelImagem.setMinimumSize(new java.awt.Dimension(350, 350));

        javax.swing.GroupLayout TUMPainelImagemLayout = new javax.swing.GroupLayout(TUMPainelImagem);
        TUMPainelImagem.setLayout(TUMPainelImagemLayout);
        TUMPainelImagemLayout.setHorizontalGroup(
            TUMPainelImagemLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(TUMLabelImagem, javax.swing.GroupLayout.DEFAULT_SIZE, 343, Short.MAX_VALUE)
        );
        TUMPainelImagemLayout.setVerticalGroup(
            TUMPainelImagemLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(TUMLabelImagem, javax.swing.GroupLayout.DEFAULT_SIZE, 321, Short.MAX_VALUE)
        );

        TUMLabelIDProduto.setText("ID do Produto");

        TUMLabelDescricao.setFont(new java.awt.Font("Ubuntu", 1, 19));
        TUMLabelDescricao.setText("Descrição");

        TUMAreaDescricao.setColumns(20);
        TUMAreaDescricao.setEditable(false);
        TUMAreaDescricao.setRows(5);
        TUMAreaDescricao.setTabSize(4);
        TUMAreaDescricao.setMinimumSize(new java.awt.Dimension(260, 90));
        TUMAreaDescricao.setOpaque(false);
        TUMPainelDescricao.setViewportView(TUMAreaDescricao);

        TUMLabelNroOferta.setText("Nro. da Oferta");

        TUMLabelnformacoes.setFont(new java.awt.Font("Ubuntu", 1, 18));
        TUMLabelnformacoes.setText("Informações");

        TUMLabelValorOriginal.setText("Valor Original");

        TUMLabelValorPromocional.setText("Valor Promocional");

        TUMBotaoCompra.setText("Comprar!");
        TUMBotaoCompra.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TUMBotaoCompraActionPerformed(evt);
            }
        });

        TUMBotaoMaisOfertas.setText("Mais ofertas");
        TUMBotaoMaisOfertas.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TUMBotaoMaisOfertasActionPerformed(evt);
            }
        });

        TUMBotaoOfertasAnteriores.setText("Ofertas Anteriores");
        TUMBotaoOfertasAnteriores.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TUMBotaoOfertasAnterioresActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout TUMostruarioLayout = new javax.swing.GroupLayout(TUMostruario);
        TUMostruario.setLayout(TUMostruarioLayout);
        TUMostruarioLayout.setHorizontalGroup(
            TUMostruarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TUMostruarioLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(TUMostruarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(TUMLabelDescricao)
                    .addGroup(TUMostruarioLayout.createSequentialGroup()
                        .addComponent(TUMPainelImagem, javax.swing.GroupLayout.PREFERRED_SIZE, 343, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGroup(TUMostruarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(TUMostruarioLayout.createSequentialGroup()
                                .addGap(18, 18, 18)
                                .addComponent(TUMLabelnformacoes))
                            .addGroup(TUMostruarioLayout.createSequentialGroup()
                                .addGap(32, 32, 32)
                                .addGroup(TUMostruarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(TUMLabelIDProduto)
                                    .addComponent(TUMLabelNroOferta)
                                    .addComponent(TUMLabelValorOriginal)
                                    .addGroup(TUMostruarioLayout.createSequentialGroup()
                                        .addGap(12, 12, 12)
                                        .addGroup(TUMostruarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                            .addComponent(TUMLabelVIDProduto, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addComponent(TUMLabelVValorOri, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addComponent(TUMLabelVNroOferta, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addComponent(TUMLabelVValorPromo, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                                    .addComponent(TUMLabelValorPromocional)
                                    .addComponent(TUMBotaoCompra, javax.swing.GroupLayout.DEFAULT_SIZE, 160, Short.MAX_VALUE))))))
                .addContainerGap(25, Short.MAX_VALUE))
            .addGroup(TUMostruarioLayout.createSequentialGroup()
                .addGap(24, 24, 24)
                .addComponent(TUMPainelDescricao, javax.swing.GroupLayout.PREFERRED_SIZE, 524, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(24, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, TUMostruarioLayout.createSequentialGroup()
                .addGap(262, 262, 262)
                .addComponent(TUMBotaoOfertasAnteriores, javax.swing.GroupLayout.DEFAULT_SIZE, 147, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(TUMBotaoMaisOfertas, javax.swing.GroupLayout.PREFERRED_SIZE, 139, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        TUMostruarioLayout.setVerticalGroup(
            TUMostruarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TUMostruarioLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(TUMostruarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(TUMPainelImagem, javax.swing.GroupLayout.PREFERRED_SIZE, 321, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(TUMostruarioLayout.createSequentialGroup()
                        .addGap(11, 11, 11)
                        .addComponent(TUMLabelnformacoes)
                        .addGap(18, 18, 18)
                        .addComponent(TUMLabelIDProduto)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TUMLabelVIDProduto, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(TUMLabelNroOferta)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TUMLabelVNroOferta, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(TUMLabelValorOriginal)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TUMLabelVValorOri, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(TUMLabelValorPromocional)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TUMLabelVValorPromo, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(TUMBotaoCompra)))
                .addGap(24, 24, 24)
                .addComponent(TUMLabelDescricao)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(TUMPainelDescricao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 36, Short.MAX_VALUE)
                .addGroup(TUMostruarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(TUMBotaoMaisOfertas)
                    .addComponent(TUMBotaoOfertasAnteriores))
                .addContainerGap())
        );

        TUPainelDeFundo.add(TUMostruario, "oferta");

        TUHistorico.setVerifyInputWhenFocusTarget(false);

        TUHPainelCompras.setMaximumSize(new java.awt.Dimension(566, 526));
        TUHPainelCompras.setMinimumSize(new java.awt.Dimension(566, 526));

        TUHCBotaoProximo.setText("Próxima Página");
        TUHCBotaoProximo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TUHCBotaoProximoActionPerformed(evt);
            }
        });

        TUHCBotaoAnterior.setText("Página Anterior");
        TUHCBotaoAnterior.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TUHCBotaoAnteriorActionPerformed(evt);
            }
        });

        TUHCPainelBR.setBorder(null);
        TUHCPainelBR.setMaximumSize(new java.awt.Dimension(258, 221));
        TUHCPainelBR.setMinimumSize(new java.awt.Dimension(258, 221));

        TUHCBRLabelNro.setText("Nro. da Oferta");

        TUHCBRLabelIDProduto.setText("ID do Produto");

        TUHCBRLabelVIDProduto.setText("ID");

        TUHCBRLabelVNro.setText("Nro");

        TUHCBRLabelData.setText("Data da compra");

        TUHCBRLabelVData.setText("Nro");

        TUHCBRLabelIDCupom.setText("ID do Cupom");

        TUHCBRLabelVIDCupom.setText("ID");

        javax.swing.GroupLayout TUHCPainelBRLayout = new javax.swing.GroupLayout(TUHCPainelBR);
        TUHCPainelBR.setLayout(TUHCPainelBRLayout);
        TUHCPainelBRLayout.setHorizontalGroup(
            TUHCPainelBRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TUHCPainelBRLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(TUHCBRLabelImagem, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(12, 12, 12)
                .addGroup(TUHCPainelBRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(TUHCBRLabelData)
                    .addGroup(TUHCPainelBRLayout.createSequentialGroup()
                        .addGap(12, 12, 12)
                        .addComponent(TUHCBRLabelVData))
                    .addComponent(TUHCBRLabelIDCupom)
                    .addGroup(TUHCPainelBRLayout.createSequentialGroup()
                        .addGap(12, 12, 12)
                        .addComponent(TUHCBRLabelVIDCupom))
                    .addComponent(TUHCBRLabelIDProduto)
                    .addComponent(TUHCBRLabelNro)
                    .addGroup(TUHCPainelBRLayout.createSequentialGroup()
                        .addGap(12, 12, 12)
                        .addComponent(TUHCBRLabelVIDProduto))
                    .addGroup(TUHCPainelBRLayout.createSequentialGroup()
                        .addGap(12, 12, 12)
                        .addComponent(TUHCBRLabelVNro)))
                .addContainerGap(21, Short.MAX_VALUE))
        );
        TUHCPainelBRLayout.setVerticalGroup(
            TUHCPainelBRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TUHCPainelBRLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(TUHCBRLabelIDCupom)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(TUHCPainelBRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(TUHCBRLabelImagem, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(TUHCPainelBRLayout.createSequentialGroup()
                        .addComponent(TUHCBRLabelVIDCupom)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TUHCBRLabelIDProduto)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TUHCBRLabelVIDProduto)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TUHCBRLabelNro)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TUHCBRLabelVNro)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(TUHCBRLabelData)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(TUHCBRLabelVData)
                .addContainerGap(21, Short.MAX_VALUE))
        );

        TUHCPainelTR.setBorder(null);
        TUHCPainelTR.setMaximumSize(new java.awt.Dimension(258, 221));
        TUHCPainelTR.setMinimumSize(new java.awt.Dimension(258, 221));

        TUHCTRLabelNro.setText("Nro. da Oferta");

        TUHCTRLabelIDProduto.setText("ID do Produto");

        TUHCTRLabelVIDProduto.setText("ID");

        TUHCTRLabelVNro.setText("Nro");

        TUHCTRLabelData.setText("Data da compra");

        TUHCTRLabelVData.setText("Nro");

        TUHCTRLabelIDCupom.setText("ID do Cupom");

        TUHCTRLabelVIDCupom.setText("ID");

        javax.swing.GroupLayout TUHCPainelTRLayout = new javax.swing.GroupLayout(TUHCPainelTR);
        TUHCPainelTR.setLayout(TUHCPainelTRLayout);
        TUHCPainelTRLayout.setHorizontalGroup(
            TUHCPainelTRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TUHCPainelTRLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(TUHCTRLabelImagem, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(12, 12, 12)
                .addGroup(TUHCPainelTRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(TUHCTRLabelData)
                    .addGroup(TUHCPainelTRLayout.createSequentialGroup()
                        .addGap(12, 12, 12)
                        .addComponent(TUHCTRLabelVData))
                    .addComponent(TUHCTRLabelIDCupom)
                    .addGroup(TUHCPainelTRLayout.createSequentialGroup()
                        .addGap(12, 12, 12)
                        .addComponent(TUHCTRLabelVIDCupom))
                    .addComponent(TUHCTRLabelIDProduto)
                    .addComponent(TUHCTRLabelNro)
                    .addGroup(TUHCPainelTRLayout.createSequentialGroup()
                        .addGap(12, 12, 12)
                        .addComponent(TUHCTRLabelVIDProduto))
                    .addGroup(TUHCPainelTRLayout.createSequentialGroup()
                        .addGap(12, 12, 12)
                        .addComponent(TUHCTRLabelVNro)))
                .addContainerGap(21, Short.MAX_VALUE))
        );
        TUHCPainelTRLayout.setVerticalGroup(
            TUHCPainelTRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TUHCPainelTRLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(TUHCTRLabelIDCupom)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(TUHCPainelTRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(TUHCTRLabelImagem, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(TUHCPainelTRLayout.createSequentialGroup()
                        .addComponent(TUHCTRLabelVIDCupom)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TUHCTRLabelIDProduto)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TUHCTRLabelVIDProduto)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TUHCTRLabelNro)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TUHCTRLabelVNro)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(TUHCTRLabelData)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(TUHCTRLabelVData)
                .addContainerGap(21, Short.MAX_VALUE))
        );

        TUHCPainelTL.setBorder(null);
        TUHCPainelTL.setMaximumSize(new java.awt.Dimension(258, 221));
        TUHCPainelTL.setMinimumSize(new java.awt.Dimension(258, 221));
        TUHCPainelTL.setPreferredSize(new java.awt.Dimension(258, 221));

        TUHCTLLabelNro.setText("Nro. da Oferta");

        TUHCTLLabelIDProduto.setText("ID do Produto");

        TUHCTLLabelVIDProduto.setText("ID");

        TUHCTLLabelVNro.setText("Nro");

        TUHCTTLabelData.setText("Data da compra");

        TUHCTLLabelVData.setText("Nro");

        TUHCTLLabelIDCupom.setText("ID do Cupom");

        TUHCTLLabelVIDCupom.setText("ID");

        javax.swing.GroupLayout TUHCPainelTLLayout = new javax.swing.GroupLayout(TUHCPainelTL);
        TUHCPainelTL.setLayout(TUHCPainelTLLayout);
        TUHCPainelTLLayout.setHorizontalGroup(
            TUHCPainelTLLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TUHCPainelTLLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(TUHCTLLabelImagem, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(12, 12, 12)
                .addGroup(TUHCPainelTLLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(TUHCTTLabelData)
                    .addGroup(TUHCPainelTLLayout.createSequentialGroup()
                        .addGap(12, 12, 12)
                        .addComponent(TUHCTLLabelVData))
                    .addComponent(TUHCTLLabelIDCupom)
                    .addGroup(TUHCPainelTLLayout.createSequentialGroup()
                        .addGap(12, 12, 12)
                        .addComponent(TUHCTLLabelVIDCupom))
                    .addComponent(TUHCTLLabelIDProduto)
                    .addComponent(TUHCTLLabelNro)
                    .addGroup(TUHCPainelTLLayout.createSequentialGroup()
                        .addGap(12, 12, 12)
                        .addComponent(TUHCTLLabelVIDProduto))
                    .addGroup(TUHCPainelTLLayout.createSequentialGroup()
                        .addGap(12, 12, 12)
                        .addComponent(TUHCTLLabelVNro)))
                .addContainerGap(23, Short.MAX_VALUE))
        );
        TUHCPainelTLLayout.setVerticalGroup(
            TUHCPainelTLLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TUHCPainelTLLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(TUHCTLLabelIDCupom)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(TUHCPainelTLLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(TUHCTLLabelImagem, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(TUHCPainelTLLayout.createSequentialGroup()
                        .addComponent(TUHCTLLabelVIDCupom)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TUHCTLLabelIDProduto)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TUHCTLLabelVIDProduto)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TUHCTLLabelNro)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TUHCTLLabelVNro)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(TUHCTTLabelData)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(TUHCTLLabelVData)
                .addContainerGap(23, Short.MAX_VALUE))
        );

        TUHCPainelBL.setBorder(null);
        TUHCPainelBL.setMaximumSize(new java.awt.Dimension(258, 221));
        TUHCPainelBL.setMinimumSize(new java.awt.Dimension(258, 221));
        TUHCPainelBL.setPreferredSize(new java.awt.Dimension(258, 221));

        TUHCBLLabelNro.setText("Nro. da Oferta");

        TUHCBLLabelIDProduto.setText("ID do Produto");

        TUHCBLLabelVIDProduto.setText("ID");

        TUHCBLLabelVNro.setText("Nro");

        TUHCBTLabelData.setText("Data da compra");

        TUHCBLLabelVData.setText("Nro");

        TUHCBLLabelIDCupom.setText("ID do Cupom");

        TUHCBLLabelVIDCupom.setText("ID");

        javax.swing.GroupLayout TUHCPainelBLLayout = new javax.swing.GroupLayout(TUHCPainelBL);
        TUHCPainelBL.setLayout(TUHCPainelBLLayout);
        TUHCPainelBLLayout.setHorizontalGroup(
            TUHCPainelBLLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TUHCPainelBLLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(TUHCBLLabelImagem, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(12, 12, 12)
                .addGroup(TUHCPainelBLLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(TUHCBTLabelData)
                    .addGroup(TUHCPainelBLLayout.createSequentialGroup()
                        .addGap(12, 12, 12)
                        .addComponent(TUHCBLLabelVData))
                    .addComponent(TUHCBLLabelIDCupom)
                    .addGroup(TUHCPainelBLLayout.createSequentialGroup()
                        .addGap(12, 12, 12)
                        .addComponent(TUHCBLLabelVIDCupom))
                    .addComponent(TUHCBLLabelIDProduto)
                    .addComponent(TUHCBLLabelNro)
                    .addGroup(TUHCPainelBLLayout.createSequentialGroup()
                        .addGap(12, 12, 12)
                        .addComponent(TUHCBLLabelVIDProduto))
                    .addGroup(TUHCPainelBLLayout.createSequentialGroup()
                        .addGap(12, 12, 12)
                        .addComponent(TUHCBLLabelVNro)))
                .addContainerGap(23, Short.MAX_VALUE))
        );
        TUHCPainelBLLayout.setVerticalGroup(
            TUHCPainelBLLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TUHCPainelBLLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(TUHCBLLabelIDCupom)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(TUHCPainelBLLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(TUHCBLLabelImagem, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(TUHCPainelBLLayout.createSequentialGroup()
                        .addComponent(TUHCBLLabelVIDCupom)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TUHCBLLabelIDProduto)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TUHCBLLabelVIDProduto)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TUHCBLLabelNro)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TUHCBLLabelVNro)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(TUHCBTLabelData)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(TUHCBLLabelVData)
                .addContainerGap(23, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout TUHPainelComprasLayout = new javax.swing.GroupLayout(TUHPainelCompras);
        TUHPainelCompras.setLayout(TUHPainelComprasLayout);
        TUHPainelComprasLayout.setHorizontalGroup(
            TUHPainelComprasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TUHPainelComprasLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(TUHPainelComprasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, TUHPainelComprasLayout.createSequentialGroup()
                        .addComponent(TUHCBotaoAnterior)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(TUHCBotaoProximo))
                    .addGroup(TUHPainelComprasLayout.createSequentialGroup()
                        .addGroup(TUHPainelComprasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(TUHCPainelTL, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(TUHCPainelBL, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 28, Short.MAX_VALUE)
                        .addGroup(TUHPainelComprasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(TUHCPainelTR, javax.swing.GroupLayout.PREFERRED_SIZE, 256, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(TUHCPainelBR, javax.swing.GroupLayout.PREFERRED_SIZE, 256, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap())
        );
        TUHPainelComprasLayout.setVerticalGroup(
            TUHPainelComprasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TUHPainelComprasLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(TUHPainelComprasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(TUHCPainelTL, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(TUHCPainelTR, javax.swing.GroupLayout.PREFERRED_SIZE, 219, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(TUHPainelComprasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(TUHCPainelBR, javax.swing.GroupLayout.PREFERRED_SIZE, 219, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(TUHCPainelBL, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(TUHPainelComprasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(TUHCBotaoProximo)
                    .addComponent(TUHCBotaoAnterior))
                .addContainerGap())
        );

        TUHistorico.addTab("Compras Efetuadas", TUHPainelCompras);

        TUHPainelPresentes.setMaximumSize(new java.awt.Dimension(566, 526));
        TUHPainelPresentes.setMinimumSize(new java.awt.Dimension(566, 526));

        TUHPBotaoProximo.setText("Próxima Página");
        TUHPBotaoProximo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TUHPBotaoProximoActionPerformed(evt);
            }
        });

        TUHPBotaoAnterior.setText("Página Anterior");
        TUHPBotaoAnterior.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TUHPBotaoAnteriorActionPerformed(evt);
            }
        });

        TUHPPainelBR.setBorder(null);
        TUHPPainelBR.setMaximumSize(new java.awt.Dimension(258, 221));
        TUHPPainelBR.setMinimumSize(new java.awt.Dimension(258, 221));

        TUHPBRLabelNro.setText("Nro. da Oferta");

        TUHPBRLabelIDProduto.setText("ID do Produto");

        TUHPBRLabelVIDProduto.setText("ID");

        TUHPBRLabelVNro.setText("Nro");

        TUHPBRLabelNome.setText("Data da compra");

        TUHPBRLabelVNome.setText("Nro");

        TUHPBRLabelIDCupom.setText("ID do Cupom");

        TUHPBRLabelVIDCupom.setText("ID");

        javax.swing.GroupLayout TUHPPainelBRLayout = new javax.swing.GroupLayout(TUHPPainelBR);
        TUHPPainelBR.setLayout(TUHPPainelBRLayout);
        TUHPPainelBRLayout.setHorizontalGroup(
            TUHPPainelBRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TUHPPainelBRLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(TUHPPainelBRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(TUHPPainelBRLayout.createSequentialGroup()
                        .addComponent(TUHPBRLabelImagem, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(12, 12, 12)
                        .addGroup(TUHPPainelBRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(TUHPBRLabelIDCupom)
                            .addGroup(TUHPPainelBRLayout.createSequentialGroup()
                                .addGap(12, 12, 12)
                                .addComponent(TUHPBRLabelVIDCupom))
                            .addComponent(TUHPBRLabelIDProduto)
                            .addComponent(TUHPBRLabelNro)
                            .addGroup(TUHPPainelBRLayout.createSequentialGroup()
                                .addGap(12, 12, 12)
                                .addComponent(TUHPBRLabelVIDProduto))
                            .addGroup(TUHPPainelBRLayout.createSequentialGroup()
                                .addGap(12, 12, 12)
                                .addComponent(TUHPBRLabelVNro))))
                    .addComponent(TUHPBRLabelNome)
                    .addGroup(TUHPPainelBRLayout.createSequentialGroup()
                        .addGap(12, 12, 12)
                        .addComponent(TUHPBRLabelVNome)))
                .addContainerGap(39, Short.MAX_VALUE))
        );
        TUHPPainelBRLayout.setVerticalGroup(
            TUHPPainelBRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TUHPPainelBRLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(TUHPBRLabelIDCupom)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(TUHPPainelBRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(TUHPBRLabelImagem, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(TUHPPainelBRLayout.createSequentialGroup()
                        .addComponent(TUHPBRLabelVIDCupom)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TUHPBRLabelIDProduto)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TUHPBRLabelVIDProduto)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TUHPBRLabelNro)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TUHPBRLabelVNro)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 15, Short.MAX_VALUE)
                .addComponent(TUHPBRLabelNome)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(TUHPBRLabelVNome)
                .addContainerGap())
        );

        TUHPPainelTR.setBorder(null);
        TUHPPainelTR.setMaximumSize(new java.awt.Dimension(258, 221));
        TUHPPainelTR.setMinimumSize(new java.awt.Dimension(258, 221));

        TUHPTRLabelNro.setText("Nro. da Oferta");

        TUHPTRLabelIDProduto.setText("ID do Produto");

        TUHPTRLabelVIDProduto.setText("ID");

        TUHPTRLabelVNro.setText("Nro");

        TUHPTRLabelNome.setText("Presenteador");

        TUHPTRLabelVNome.setText("Nro");

        TUHPTRLabelIDCupom.setText("ID do Cupom");

        TUHPTRLabelVIDCupom.setText("ID");

        javax.swing.GroupLayout TUHPPainelTRLayout = new javax.swing.GroupLayout(TUHPPainelTR);
        TUHPPainelTR.setLayout(TUHPPainelTRLayout);
        TUHPPainelTRLayout.setHorizontalGroup(
            TUHPPainelTRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TUHPPainelTRLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(TUHPPainelTRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(TUHPPainelTRLayout.createSequentialGroup()
                        .addComponent(TUHPTRLabelImagem, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(12, 12, 12)
                        .addGroup(TUHPPainelTRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(TUHPTRLabelIDCupom)
                            .addGroup(TUHPPainelTRLayout.createSequentialGroup()
                                .addGap(12, 12, 12)
                                .addComponent(TUHPTRLabelVIDCupom))
                            .addComponent(TUHPTRLabelIDProduto)
                            .addComponent(TUHPTRLabelNro)
                            .addGroup(TUHPPainelTRLayout.createSequentialGroup()
                                .addGap(12, 12, 12)
                                .addComponent(TUHPTRLabelVIDProduto))
                            .addGroup(TUHPPainelTRLayout.createSequentialGroup()
                                .addGap(12, 12, 12)
                                .addComponent(TUHPTRLabelVNro))))
                    .addComponent(TUHPTRLabelNome)
                    .addGroup(TUHPPainelTRLayout.createSequentialGroup()
                        .addGap(12, 12, 12)
                        .addComponent(TUHPTRLabelVNome)))
                .addContainerGap(39, Short.MAX_VALUE))
        );
        TUHPPainelTRLayout.setVerticalGroup(
            TUHPPainelTRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TUHPPainelTRLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(TUHPTRLabelIDCupom)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(TUHPPainelTRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(TUHPTRLabelImagem, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(TUHPPainelTRLayout.createSequentialGroup()
                        .addComponent(TUHPTRLabelVIDCupom)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TUHPTRLabelIDProduto)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TUHPTRLabelVIDProduto)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TUHPTRLabelNro)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TUHPTRLabelVNro)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 15, Short.MAX_VALUE)
                .addComponent(TUHPTRLabelNome)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(TUHPTRLabelVNome)
                .addContainerGap())
        );

        TUHPPainelTL.setBorder(null);
        TUHPPainelTL.setMaximumSize(new java.awt.Dimension(258, 221));
        TUHPPainelTL.setMinimumSize(new java.awt.Dimension(258, 221));

        TUHPTLLabelNro.setText("Nro. da Oferta");

        TUHPTLLabelIDProduto.setText("ID do Produto");

        TUHPTLLabelVIDProduto.setText("ID");

        TUHPTLLabelVNro.setText("Nro");

        TUHPTTLabelNome.setText("Presenteador");

        TUHPTLLabelVNome.setText("Nro");

        TUHPTLLabelIDCupom.setText("ID do Cupom");

        TUHPTLLabelVIDCupom.setText("ID");

        javax.swing.GroupLayout TUHPPainelTLLayout = new javax.swing.GroupLayout(TUHPPainelTL);
        TUHPPainelTL.setLayout(TUHPPainelTLLayout);
        TUHPPainelTLLayout.setHorizontalGroup(
            TUHPPainelTLLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TUHPPainelTLLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(TUHPPainelTLLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(TUHPPainelTLLayout.createSequentialGroup()
                        .addComponent(TUHPTLLabelImagem, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(12, 12, 12)
                        .addGroup(TUHPPainelTLLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(TUHPTLLabelIDCupom)
                            .addGroup(TUHPPainelTLLayout.createSequentialGroup()
                                .addGap(12, 12, 12)
                                .addComponent(TUHPTLLabelVIDCupom))
                            .addComponent(TUHPTLLabelIDProduto)
                            .addComponent(TUHPTLLabelNro)
                            .addGroup(TUHPPainelTLLayout.createSequentialGroup()
                                .addGap(12, 12, 12)
                                .addComponent(TUHPTLLabelVIDProduto))
                            .addGroup(TUHPPainelTLLayout.createSequentialGroup()
                                .addGap(12, 12, 12)
                                .addComponent(TUHPTLLabelVNro))))
                    .addComponent(TUHPTTLabelNome)
                    .addGroup(TUHPPainelTLLayout.createSequentialGroup()
                        .addGap(12, 12, 12)
                        .addComponent(TUHPTLLabelVNome)))
                .addContainerGap(30, Short.MAX_VALUE))
        );
        TUHPPainelTLLayout.setVerticalGroup(
            TUHPPainelTLLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TUHPPainelTLLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(TUHPTLLabelIDCupom)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(TUHPPainelTLLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(TUHPTLLabelImagem, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(TUHPPainelTLLayout.createSequentialGroup()
                        .addComponent(TUHPTLLabelVIDCupom)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TUHPTLLabelIDProduto)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TUHPTLLabelVIDProduto)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TUHPTLLabelNro)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TUHPTLLabelVNro)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 15, Short.MAX_VALUE)
                .addComponent(TUHPTTLabelNome)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(TUHPTLLabelVNome)
                .addContainerGap())
        );

        TUHPPainelBL.setBorder(null);
        TUHPPainelBL.setMaximumSize(new java.awt.Dimension(258, 221));
        TUHPPainelBL.setMinimumSize(new java.awt.Dimension(258, 221));
        TUHPPainelBL.setPreferredSize(new java.awt.Dimension(258, 221));

        TUHPBLLabelNro.setText("Nro. da Oferta");

        TUHPBLLabelIDProduto.setText("ID do Produto");

        TUHPBLLabelVIDProduto.setText("ID");

        TUHPBLLabelVNro.setText("Nro");

        TUHPBTLabelNome.setText("Data da compra");

        TUHPBLLabelVNome.setText("Nro");

        TUHPBLLabelIDCupom.setText("ID do Cupom");

        TUHPBLLabelVIDCupom.setText("ID");

        javax.swing.GroupLayout TUHPPainelBLLayout = new javax.swing.GroupLayout(TUHPPainelBL);
        TUHPPainelBL.setLayout(TUHPPainelBLLayout);
        TUHPPainelBLLayout.setHorizontalGroup(
            TUHPPainelBLLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TUHPPainelBLLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(TUHPPainelBLLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(TUHPPainelBLLayout.createSequentialGroup()
                        .addComponent(TUHPBLLabelImagem, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(12, 12, 12)
                        .addGroup(TUHPPainelBLLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(TUHPBLLabelIDCupom)
                            .addGroup(TUHPPainelBLLayout.createSequentialGroup()
                                .addGap(12, 12, 12)
                                .addComponent(TUHPBLLabelVIDCupom))
                            .addComponent(TUHPBLLabelIDProduto)
                            .addComponent(TUHPBLLabelNro)
                            .addGroup(TUHPPainelBLLayout.createSequentialGroup()
                                .addGap(12, 12, 12)
                                .addComponent(TUHPBLLabelVIDProduto))
                            .addGroup(TUHPPainelBLLayout.createSequentialGroup()
                                .addGap(12, 12, 12)
                                .addComponent(TUHPBLLabelVNro))))
                    .addComponent(TUHPBTLabelNome)
                    .addGroup(TUHPPainelBLLayout.createSequentialGroup()
                        .addGap(12, 12, 12)
                        .addComponent(TUHPBLLabelVNome)))
                .addContainerGap(32, Short.MAX_VALUE))
        );
        TUHPPainelBLLayout.setVerticalGroup(
            TUHPPainelBLLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TUHPPainelBLLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(TUHPBLLabelIDCupom)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(TUHPPainelBLLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(TUHPBLLabelImagem, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(TUHPPainelBLLayout.createSequentialGroup()
                        .addComponent(TUHPBLLabelVIDCupom)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TUHPBLLabelIDProduto)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TUHPBLLabelVIDProduto)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TUHPBLLabelNro)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TUHPBLLabelVNro)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 17, Short.MAX_VALUE)
                .addComponent(TUHPBTLabelNome)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(TUHPBLLabelVNome)
                .addContainerGap())
        );

        javax.swing.GroupLayout TUHPainelPresentesLayout = new javax.swing.GroupLayout(TUHPainelPresentes);
        TUHPainelPresentes.setLayout(TUHPainelPresentesLayout);
        TUHPainelPresentesLayout.setHorizontalGroup(
            TUHPainelPresentesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TUHPainelPresentesLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(TUHPainelPresentesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, TUHPainelPresentesLayout.createSequentialGroup()
                        .addComponent(TUHPBotaoAnterior)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(TUHPBotaoProximo))
                    .addGroup(TUHPainelPresentesLayout.createSequentialGroup()
                        .addGroup(TUHPainelPresentesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(TUHPPainelTL, javax.swing.GroupLayout.PREFERRED_SIZE, 256, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(TUHPPainelBL, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 19, Short.MAX_VALUE)
                        .addGroup(TUHPainelPresentesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(TUHPPainelTR, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(TUHPPainelBR, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap())
        );
        TUHPainelPresentesLayout.setVerticalGroup(
            TUHPainelPresentesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TUHPainelPresentesLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(TUHPainelPresentesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(TUHPPainelTL, javax.swing.GroupLayout.PREFERRED_SIZE, 219, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(TUHPPainelTR, javax.swing.GroupLayout.PREFERRED_SIZE, 219, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(TUHPainelPresentesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(TUHPPainelBR, javax.swing.GroupLayout.PREFERRED_SIZE, 219, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(TUHPPainelBL, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(TUHPainelPresentesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(TUHPBotaoProximo)
                    .addComponent(TUHPBotaoAnterior))
                .addContainerGap())
        );

        TUHistorico.addTab("Presentes Recebidos", TUHPainelPresentes);

        TUPainelDeFundo.add(TUHistorico, "historico");

        TUOpcoes.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        TUOBotaoHistorico.setText("Historico");
        TUOBotaoHistorico.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TUOBotaoHistoricoActionPerformed(evt);
            }
        });

        TUOLabelGruspon.setText("GrUSPon");

        TUOBotaoOferta.setText("Ofertas");
        TUOBotaoOferta.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TUOBotaoOfertaActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout TUOpcoesLayout = new javax.swing.GroupLayout(TUOpcoes);
        TUOpcoes.setLayout(TUOpcoesLayout);
        TUOpcoesLayout.setHorizontalGroup(
            TUOpcoesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TUOpcoesLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(TUOpcoesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(TUOLabelGruspon, javax.swing.GroupLayout.DEFAULT_SIZE, 147, Short.MAX_VALUE)
                    .addComponent(TUOBotaoOferta, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 147, Short.MAX_VALUE)
                    .addComponent(TUOBotaoHistorico, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 147, Short.MAX_VALUE))
                .addContainerGap())
        );
        TUOpcoesLayout.setVerticalGroup(
            TUOpcoesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TUOpcoesLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(TUOLabelGruspon, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(TUOBotaoOferta)
                .addGap(18, 18, 18)
                .addComponent(TUOBotaoHistorico)
                .addContainerGap(361, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout TelaUsuarioLayout = new javax.swing.GroupLayout(TelaUsuario);
        TelaUsuario.setLayout(TelaUsuarioLayout);
        TelaUsuarioLayout.setHorizontalGroup(
            TelaUsuarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, TelaUsuarioLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(TUOpcoes, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(TUPainelDeFundo, javax.swing.GroupLayout.PREFERRED_SIZE, 574, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        TelaUsuarioLayout.setVerticalGroup(
            TelaUsuarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, TelaUsuarioLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(TelaUsuarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(TUOpcoes, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(TUPainelDeFundo, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 564, Short.MAX_VALUE))
                .addContainerGap())
        );

        PainelDeFundo.add(TelaUsuario, "usuario");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(PainelDeFundo, javax.swing.GroupLayout.DEFAULT_SIZE, 785, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                        .addGap(12, 12, 12)
                        .addComponent(BarraCreditos, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                        .addGap(12, 12, 12)
                        .addComponent(BarraLogin, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(BarraLogin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(PainelDeFundo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(BarraCreditos, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

	private void BLBotaoCadastroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BLBotaoCadastroActionPerformed
		TelaCadastroUsuario.setVisible(true);
	}//GEN-LAST:event_BLBotaoCadastroActionPerformed

	public void colocaProdutosValidos() {
		TelaProdutoClear();
		try {
			produtos.clear();
			produtos = Produto.getProdutosValidos(db.getConnection());
			
			int totalProd = produtos.size();
			int indexProd = 0;
			int max;
			ImageIcon im;
			max = 4*prodPage+4 < totalProd ? 4*prodPage+4 : totalProd;
			indexProd = 4*prodPage;
			//primeiro painel
			if(indexProd < max){
				TAPTLLabelVIDProduto.setText(""+produtos.get(indexProd).getIdProduto());
				TAPTLLabelVEmpresa.setText(""+produtos.get(indexProd).getEmpresa());
				TAPTLLabelVTipo.setText(""+produtos.get(indexProd).getTipo().charAt(0));
				TAPTLLabelVValor.setText(""+produtos.get(indexProd).getValor());
				TAPTLCampoDescricao.setText(""+produtos.get(indexProd).getDescricao());
				TAPTLLabelImagem.setIcon(desenhaImagem(produtos.get(indexProd).getFoto(), 102, 102));
				
			} else {
				TAPPainelTL.setVisible(false);
			}

			//segundo painel
			indexProd++;
			if(indexProd < max){
				TAPTRLabelVIDProduto.setText(""+produtos.get(indexProd).getIdProduto());
				TAPTRLabelVEmpresa.setText(""+produtos.get(indexProd).getEmpresa());
				TAPTRLabelVTipo.setText(""+produtos.get(indexProd).getTipo().charAt(0));
				TAPTRLabelVValor.setText(""+produtos.get(indexProd).getValor());
				TAPTRCampoDescricao.setText(""+produtos.get(indexProd).getDescricao());
				TAPTRLabelImagem.setIcon(desenhaImagem(produtos.get(indexProd).getFoto(), 102, 102));
				
			} else {
				TAPPainelTR.setVisible(false);
			}

			//terceiro painel
			indexProd++;
			if(indexProd < max){
				TAPBLLabelVIDProduto.setText(""+produtos.get(indexProd).getIdProduto());
				TAPBLLabelVEmpresa.setText(""+produtos.get(indexProd).getEmpresa());
				TAPBLLabelVTipo.setText(""+produtos.get(indexProd).getTipo().charAt(0));
				TAPBLLabelVValor.setText(""+produtos.get(indexProd).getValor());
				jTextPane3.setText(""+produtos.get(indexProd).getDescricao());
				TAPBLLabelImagem.setIcon(desenhaImagem(produtos.get(indexProd).getFoto(), 102, 102));
				
			} else {
				TAPPainelBL.setVisible(false);
			}

			//quarto painel
			indexProd++;
			if(indexProd < max){
				TAPBRLabelVIDProduto.setText(""+produtos.get(indexProd).getIdProduto());
				TAPBRLabelVEmpresa.setText(""+produtos.get(indexProd).getEmpresa());
				TAPBRLabelVTipo.setText(""+produtos.get(indexProd).getTipo().charAt(0));
				TAPBRLabelVValor.setText(""+produtos.get(indexProd).getValor());
				jTextPane4.setText(""+produtos.get(indexProd).getDescricao());
				TAPBRLabelImagem.setIcon(desenhaImagem(produtos.get(indexProd).getFoto(), 102, 102));
				
			} else {
				TAPPainelBR.setVisible(false);
			}

			if(totalProd <= 4*prodPage+4){
				TAPBotaoProximo.setEnabled(false);
			}
			if(prodPage == 0){
				TAPBotaoAnterior.setEnabled(false);
			}


		} catch (SQLException ex) {
			Logger.getLogger(InterfaceGrafica.class.getName()).log(Level.SEVERE, null, ex);
		}

	}

	private void TLBotaoLoginActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TLBotaoLoginActionPerformed

		TelaLoginClear ();
		if ( TLCampoLogin.getText().equals("admin") &&
				new String(TLCampoSenha.getPassword()).equals("admin")){
			CardLayout cl = (CardLayout) PainelDeFundo.getLayout();

			colocaProdutosValidos();
			cl.show(PainelDeFundo, "admin");

			BLBotaoCadastro.setVisible(false);
			TelaLogin.setVisible(false);


		} else {
			if ( TLCampoLogin.getText().equals("") ||
					new String(TLCampoSenha.getPassword()).equals("")) {
					TLLabelErro.setText("Preencha a senha e o campo de Login!");
					TLLabelErro.setVisible(true);
			} else if (!TLRBotaoCPF.isSelected() && !TLRBotaoEmail.isSelected()) {
				TLLabelErro.setText("Selecione a forma de login");
				TLLabelErro.setVisible(true);
			} else {
				try {
					if (TLRBotaoCPF.isSelected()) {
						try {
							BigDecimal cpf = new BigDecimal (TLCampoLogin.getText());
							user.loginCPF(db.getConnection(), cpf,
							new String(TLCampoSenha.getPassword()));
						} catch (NumberFormatException ex) {
							TLLabelErro.setText ("CPF deve ser formado somente por dígitos");
							TLLabelErro.setVisible(true);
							return;
						}
					} else {
						user.loginEmail(db.getConnection(), TLCampoLogin.getText(),
							new String(TLCampoSenha.getPassword()));
					}
					BLBotaoCadastro.setVisible(false);
					TelaLogin.setVisible(false);
					CardLayout cl = (CardLayout) PainelDeFundo.getLayout();
					cl.show(PainelDeFundo, "usuario");
					BLLabelSaudacao.setText("Bem vindo de volta, ");
					BLLabelUsuario.setText(user.getName());
					BLLabelCreditos.setText("Seus Creditos: "+user.getCreditos());
					TUOBotaoOferta.setText("Atualizar");
					TUOBotaoHistorico.setText("Historico");
					
                                        
				} catch (SQLException ex) {

					if (ex.getErrorCode() == DataBase.LOGIN_INVALIDO) {
						if (TLRBotaoEmail.isSelected())
							TLLabelErro.setText("Email inválido");
						else
							TLLabelErro.setText("CPF inválido");
						TLLabelErro.setVisible(true);
					} else if (ex.getErrorCode() == DataBase.SENHA_INVALIDA) {
						TLLabelErro.setText("Senha inválida");
						TLLabelErro.setVisible(true);
					} else {
						ex.printStackTrace();
						JOptionPane.showMessageDialog(null, ex.getMessage(), "Erro desconhecido BLSQLExc", JOptionPane.ERROR_MESSAGE);
					}
				} catch (Exception ex) {

					JOptionPane.showMessageDialog(null, ex.getMessage(), "Erro desconhecido BLException", JOptionPane.ERROR_MESSAGE);
				}
			}
		}

	}//GEN-LAST:event_TLBotaoLoginActionPerformed

	private void JFrameWindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_JFrameWindowClosing

		if (db != null) {
			try {
				db.closeConnection();
			} catch (SQLException ex) {
				Logger.getLogger(InterfaceGrafica.class.getName()).log(Level.SEVERE, null, ex);
			}
		}
		System.exit(0);

	}//GEN-LAST:event_JFrameWindowClosing

	private void TCUBotaoCadastroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TCUBotaoCadastroActionPerformed
		//TODO modificar para a versao anterior
		TelaCadastroUsuarioClear(); //TODO testar isso
		boolean ok = true;
		int cep = 0, nro = 0;
		BigDecimal cpf = BigDecimal.ONE;

		if (TCUCampoNome.getText().equals("")) {
			TCULabelNome.setForeground(java.awt.Color.red);
			ok = false;
		}
		if (TCUCampoCPF.getText().equals("           ")) {
			TCULabelCPF.setForeground(java.awt.Color.red);
			ok = false;
		} else
			cpf = new BigDecimal(TCUCampoCPF.getText());

		if (TCUCampoEmail.getText().equals("")) {
			TCULabelEmail.setForeground(java.awt.Color.red);
			ok = false;
		}
		if (new String (TCUCampoSenha.getPassword()).equals("") ||
			TCUCampoSenha.getPassword().length > 8) {
			TCULabelSenha.setForeground(java.awt.Color.red);
			TCUCampoSenha.setText("");
			ok = false;
		}
		if (new String (TCUCampoConfirmacao.getPassword()).equals("") ||
			TCUCampoConfirmacao.getPassword().length > 8) {
			TCULabelConfirmacao.setForeground(java.awt.Color.red);
			TCUCampoConfirmacao.setText("");
			ok = false;
		}
		if (TCUCampoNro.getText().length() > 4 || TCUCampoNro.getText().equals("")) {
			TCULabelNro.setForeground(java.awt.Color.red);
			TCUCampoNro.setText("");
			ok = false;
		} else
			nro = Integer.parseInt(TCUCampoNro.getText());

		if (TCUCampoCEP.getText().equals("        ")) {
			TCULabelCEP.setForeground(java.awt.Color.red);
			ok = false;
		} else
			cep = Integer.parseInt(TCUCampoCEP.getText());

		if (!Arrays.equals(TCUCampoConfirmacao.getPassword(), TCUCampoSenha.getPassword())) {
			TCULabelConfirmacao.setForeground(java.awt.Color.red);
			TCULabelErro.setText("Confirmação de senha inválida");
			TCULabelErro.setVisible(true);
			ok = false;
		}
		if (ok) {
			try {

				Usuario.novoUsuario(db.getConnection(), cpf,
					TCUCampoEmail.getText(), TCUCampoNome.getText(),
					new String(TCUCampoSenha.getPassword()),
					TCUCampoRua.getText(), nro,
					cep, (String) TCUComboUF.getSelectedItem(),
					TCUCampoCidade.getText(), TCUCampoBairro.getText());
				TelaCadastroUsuario.setVisible(false);

			} catch (SQLException sqlex) {

				if (sqlex.getErrorCode() == DataBase.CAMPO_EXISTENTE) {
					TCULabelCPF.setForeground(java.awt.Color.red);
					TCULabelErro.setText(String.format("CPF ou email já está sendo utilizado", TCUCampoCPF.getText()));
					TCULabelErro.setVisible(true);
				} else
					JOptionPane.showMessageDialog(null, sqlex.getMessage(), "Erro desconhecido", JOptionPane.ERROR_MESSAGE);

			} catch (Exception ex) {

				JOptionPane.showMessageDialog(null, ex.getMessage(), "Erro desconhecido", JOptionPane.ERROR_MESSAGE);

			}
		}

	}//GEN-LAST:event_TCUBotaoCadastroActionPerformed

	private void TelaCadastroUsuarioComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_TelaCadastroUsuarioComponentShown
		TelaCadastroUsuarioClear();
	}//GEN-LAST:event_TelaCadastroUsuarioComponentShown

	private void TelaLoginComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_TelaLoginComponentShown
		TelaLoginClear();
	}//GEN-LAST:event_TelaLoginComponentShown

	private void TCOBotaoCadastroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TCOBotaoCadastroActionPerformed
		TelaCadastroOfertaClear();
		boolean ok = true;
		int quantidade = 0, validade = 0, nropessoas = 0;
		String caminho = null;
		//Pega os dias uteis
		String diasUteis = "";
		if (TCOCheckSeg.isSelected())
			diasUteis = diasUteis + "Seg ";
		if (TCOCheckTer.isSelected())
			diasUteis = diasUteis + "Ter ";
		if (TCOCheckQua.isSelected())
			diasUteis = diasUteis + "Qua ";
		if (TCOCheckQui.isSelected())
			diasUteis = diasUteis + "Qui ";
		if (TCOCheckSex.isSelected())
			diasUteis = diasUteis + "Sex ";
		if (TCOCheckSab.isSelected())
			diasUteis = diasUteis + "Sab ";
		if (TCOCheckDom.isSelected())
			diasUteis = diasUteis + "Dom ";

		//Checagem de campos nulos
		if (TCOCampoQuantidade.getText().equals("")) {
			TCOLabelQuantidade.setForeground(java.awt.Color.red);
			ok = false;
		} else
			quantidade = Integer.parseInt(TCOCampoQuantidade.getText());
		if (TCOCampoValidade.getText().equals("")) {
			TCOLabelValidade.setForeground(java.awt.Color.red);
			ok = false;
		} else
			validade = Integer.parseInt(TCOCampoQuantidade.getText());
		if (TCOCampoNroPessoas.getText().equals("")) {
			TCOLabelNroPessoas.setForeground(java.awt.Color.red);
			ok = false;
		} else
			nropessoas = Integer.parseInt(TCOCampoNroPessoas.getText());

		if (diasUteis.equals("")) {
			TCOLabelDiasuteis.setForeground(java.awt.Color.red);
			ok = false;
		}
		if (TCOCampoHorario.getText().equals("")) {
			TCOLabelHorario.setForeground(java.awt.Color.red);
			ok = false;
		}
		if (TCOCampoLocal.getText().equals("")) {
			TCOLabelLocal.setForeground(java.awt.Color.red);
			ok = false;
		}
		//Pega o caminho da imagem
		if (OfertaFileChooser.getSelectedFile() != null) {
			try {
				caminho = OfertaFileChooser.getSelectedFile().getCanonicalPath();
			} catch (IOException ex) {
				TCOLabelDiretorioImagem.setForeground(java.awt.Color.red);
				caminho = null;
			}
		}
		//Se nao deu erro, insere
		//TODO fazer uma transacao
		if (ok) {
			try {
				Oferta.novaOferta(db.getConnection(), Integer.parseInt(TCOLabelVIdProduto.getText()),
					quantidade,	validade, diasUteis, TCOCampoHorario.getText(),
					TCOCampoLocal.getText(), nropessoas, caminho);
				TelaCadastroOferta.setVisible(false);
			} catch (FileNotFoundException ex) {
				JOptionPane.showMessageDialog(null, "Imagem não encontrada.", "Erro", JOptionPane.ERROR_MESSAGE);
			} catch (IOException ex) {
				JOptionPane.showMessageDialog(null, "Não foi possível carregar a imagem.", "Erro", JOptionPane.ERROR_MESSAGE);
				ex.printStackTrace();
			} catch (Exception ex) {
				JOptionPane.showMessageDialog(null, ex.getMessage(), "Erro desconhecido", JOptionPane.ERROR_MESSAGE);
			}
		}
	}//GEN-LAST:event_TCOBotaoCadastroActionPerformed

	private void TCOBotaoSelecionarImagemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TCOBotaoSelecionarImagemActionPerformed
		TelaCadastroOferta.setAlwaysOnTop(false);
		OfertaFileChooser.setVisible(true);
		OfertaFileChooser.showOpenDialog(this);
	}//GEN-LAST:event_TCOBotaoSelecionarImagemActionPerformed

	private void OfertaFileChooserActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_OfertaFileChooserActionPerformed
		if (evt.getActionCommand().equals(JFileChooser.APPROVE_SELECTION)) {
			try {
				TCOLabelDiretorioImagem.setText(OfertaFileChooser.getSelectedFile().getCanonicalPath());
			} catch (Exception ex) {
				Logger.getLogger(InterfaceGrafica.class.getName()).log(Level.SEVERE, null, ex);
			}
		}
	}//GEN-LAST:event_OfertaFileChooserActionPerformed

	private void TelaCadastroOfertaComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_TelaCadastroOfertaComponentShown
		TelaCadastroOfertaClear();
	}//GEN-LAST:event_TelaCadastroOfertaComponentShown

	/**
	 * 
	 * 
	 *	@param type
	 *		booleano que indica qual dos paineis sera trocado. TRUE para
	 *			o painel das compras, FALSE para os presentes
	 * 
	 */
	private void colocaHistoricoCompras(){

		TelaHistoricoCompraClear();

		int totalComp = compras.size();
		int indexComp = 0;
		int max;
		ImageIcon im;
		max = 4*compHistPage+4 < totalComp ? 4*compHistPage+4 : totalComp;
		indexComp = 4*compHistPage;

		//primeiro painel
		if(indexComp < max){
			TUHCTLLabelVIDProduto.setText(""+compras.get(indexComp).getIdProduto());
			TUHCTLLabelVIDCupom.setText(""+compras.get(indexComp).getIdCompra());
			TUHCTLLabelVNro.setText(""+compras.get(indexComp).getNroOferta());
			TUHCTLLabelVData.setText(""+compras.get(indexComp).getDataCompra());
			TUHCTLLabelImagem.setIcon(desenhaImagem(compras.get(indexComp).getFoto(), 102, 102));
		} else {
			TUHCPainelTL.setVisible(false);
		}

		//segundo painel
		indexComp++;
		if(indexComp < max){
			TUHCTRLabelVIDProduto.setText(""+compras.get(indexComp).getIdProduto());
			TUHCTRLabelVIDCupom.setText(""+compras.get(indexComp).getIdCompra());
			TUHCTRLabelVNro.setText(""+compras.get(indexComp).getNroOferta());
			TUHCTRLabelVData.setText(""+compras.get(indexComp).getDataCompra());
			TUHCTRLabelImagem.setIcon(desenhaImagem(compras.get(indexComp).getFoto(), 102, 102));
			
		} else {
			TUHCPainelTR.setVisible(false);
		}

		//terceiro painel
		indexComp++;
		if(indexComp < max){
			TUHCBLLabelVIDProduto.setText(""+compras.get(indexComp).getIdProduto());
			TUHCBLLabelVIDCupom.setText(""+compras.get(indexComp).getIdCompra());
			TUHCBLLabelVNro.setText(""+compras.get(indexComp).getNroOferta());
			TUHCBLLabelVData.setText(""+compras.get(indexComp).getDataCompra());
			TUHCBLLabelImagem.setIcon(desenhaImagem(compras.get(indexComp).getFoto(), 102, 102));
			
		} else {
			TUHCPainelBL.setVisible(false);
		}

		//quarto painel
		indexComp++;
		if(indexComp < max){
			TUHCBRLabelVIDProduto.setText(""+compras.get(indexComp).getIdProduto());
			TUHCBRLabelVIDCupom.setText(""+compras.get(indexComp).getIdCompra());
			TUHCBRLabelVNro.setText(""+compras.get(indexComp).getNroOferta());
			TUHCBRLabelVData.setText(""+compras.get(indexComp).getDataCompra());
			TUHCBRLabelImagem.setIcon(desenhaImagem(compras.get(indexComp).getFoto(), 102, 102));
			
		} else {
			TUHCPainelBR.setVisible(false);
		}

		if(totalComp <= 4*compHistPage+4){
			TUHCBotaoProximo.setEnabled(false);
		}
		if(compHistPage == 0){
			TUHCBotaoAnterior.setEnabled(false);
		}

                if(max == 0){

                        TUHCTLLabelVIDProduto.setText("");
                        TUHCTLLabelVIDCupom.setText("");
                        TUHCTLLabelVNro.setText("");
                        TUHCTLLabelVData.setText("");
                        FileInputStream file;
                        Image img = null;
                        try {
                            file = new FileInputStream("./images/naocompras.jpg");
                            img = ImageIO.read(file);
                        } catch (FileNotFoundException ex) {
                            Logger.getLogger(InterfaceGrafica.class.getName()).log(Level.SEVERE, null, ex);
                        } catch (IOException ex) {
                            System.err.println("IOException: " + ex.getMessage());
                        }
                        TUHCTLLabelImagem.setIcon(desenhaImagem(img, 102, 102));
                        TUHCPainelTL.setVisible(true);

                }
		
	}

	private void colocaHistoricoPresentes(){

		TelaHistoricoPresenteClear();

		int totalPres = presentes.size();
		int indexPres = 0;
		int max;
		ImageIcon im;
		max = 4*presHistPage+4 < totalPres ? 4*compHistPage+4 : totalPres;
		indexPres = 4*presHistPage;
		//primeiro painel
		if(indexPres < max){
			TUHPTLLabelVIDProduto.setText(""+presentes.get(indexPres).getIdProduto());
			TUHPTLLabelVIDCupom.setText(""+presentes.get(indexPres).getIdCompra());
			TUHPTLLabelVNro.setText(""+presentes.get(indexPres).getNroOferta());
			TUHPTLLabelVNome.setText(""+presentes.get(indexPres).getPresenteador());
			TUHPTLLabelImagem.setIcon(desenhaImagem(compras.get(indexPres).getFoto(), 102, 102));
			
		} else {
			TUHPPainelTL.setVisible(false);
		}
		//segundo painel
		indexPres++;
		if(indexPres < max){
			TUHPTRLabelVIDProduto.setText(""+presentes.get(indexPres).getIdProduto());
			TUHPTRLabelVIDCupom.setText(""+presentes.get(indexPres).getIdCompra());
			TUHPTRLabelVNro.setText(""+presentes.get(indexPres).getNroOferta());
			TUHPTRLabelVNome.setText(""+presentes.get(indexPres).getPresenteador());
			TUHPTRLabelImagem.setIcon(desenhaImagem(compras.get(indexPres).getFoto(), 102, 102));
			
		} else {
			TUHPPainelTR.setVisible(false);
		}

		//terceiro painel
		indexPres++;
		if(indexPres < max){
			TUHPBLLabelVIDProduto.setText(""+presentes.get(indexPres).getIdProduto());
			TUHPBLLabelVIDCupom.setText(""+presentes.get(indexPres).getIdCompra());
			TUHPBLLabelVNro.setText(""+presentes.get(indexPres).getNroOferta());
			TUHPBLLabelVNome.setText(""+presentes.get(indexPres).getPresenteador());
			TUHPBLLabelImagem.setIcon(desenhaImagem(compras.get(indexPres).getFoto(), 102, 102));
			
		} else {
			TUHPPainelBL.setVisible(false);
		}

		//quarto painel
		indexPres++;
		if(indexPres < max){
			TUHPBRLabelVIDProduto.setText(""+presentes.get(indexPres).getIdProduto());
			TUHPBRLabelVIDCupom.setText(""+presentes.get(indexPres).getIdCompra());
			TUHPBRLabelVNro.setText(""+presentes.get(indexPres).getNroOferta());
			TUHPBRLabelVNome.setText(""+presentes.get(indexPres).getPresenteador());
			TUHPBRLabelImagem.setIcon(desenhaImagem(compras.get(indexPres).getFoto(), 102, 102));
			
		} else {
			TUHPPainelBR.setVisible(false);
		}

		if(totalPres <= 4*presHistPage+4){
			TUHPBotaoProximo.setEnabled(false);
		}
		if(compHistPage == 0){
			TUHPBotaoAnterior.setEnabled(false);
		}
                if(max == 0){
                    
                        TUHPTLLabelVIDProduto.setText("");
                        TUHPTLLabelVIDCupom.setText("");
                        TUHPTLLabelVNro.setText("");
                        TUHPTLLabelVNome.setText("");
                        FileInputStream file;
                        Image img = null;
                        try {
                            file = new FileInputStream("./images/naopresentes.jpg");
                            img = ImageIO.read(file);
                        } catch (FileNotFoundException ex) {
                            Logger.getLogger(InterfaceGrafica.class.getName()).log(Level.SEVERE, null, ex);
                        } catch (IOException ex) {
                            System.err.println("IOException: " + ex.getMessage());
                        }
                        TUHPTLLabelImagem.setIcon(desenhaImagem(img, 102, 102));
                        TUHPPainelTL.setVisible(true);

                }

	}


	private void TUOBotaoHistoricoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TUOBotaoHistoricoActionPerformed
		try {
			compras.clear();
			presentes.clear();
			user.getHistorico(compras, presentes);
			CardLayout cl = (CardLayout) TUPainelDeFundo.getLayout();

			colocaHistoricoCompras();
			colocaHistoricoPresentes();
			cl.show(TUPainelDeFundo, "historico");
			TUOBotaoHistorico.setText("Atualizar");
			TUOBotaoOferta.setText("Ofertas");
		} catch (SQLException ex) {
			JOptionPane.showMessageDialog(null, ex.getMessage(), "Erro desconhecido", JOptionPane.ERROR_MESSAGE);
		}
	}//GEN-LAST:event_TUOBotaoHistoricoActionPerformed

	private void TelaLoginWindowDeactivated(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_TelaLoginWindowDeactivated
		
	}//GEN-LAST:event_TelaLoginWindowDeactivated

	private void TUMBotaoCompraActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TUMBotaoCompraActionPerformed
		try {
			if (ofertas.get(indexOfertas).isDisponivel(db.getConnection())) {
				db.getConnection().setAutoCommit(false);
				Oferta of = ofertas.get(indexOfertas);
				recomendacoes.clear();
				recomendacoes = user.getRecomendacoes (of.getIdProduto(), of.getNroOferta());
				int i, size;
				TRComboUsuarios.removeAllItems();
				if ((size = recomendacoes.size()) > 0) {
					for (i = 0; i < size; i++) {
						TRComboUsuarios.addItem(
							Usuario.getEmailUsuario(db.getConnection(), recomendacoes.get(i)));
					}
					TRComboUsuarios.setSelectedIndex(-1);
					TelaRecomendacao.setVisible(true);
					TelaRecomendacao.setAlwaysOnTop(true);
				} else {
					TelaCompra.setVisible(true);
					TelaCompra.setAlwaysOnTop(true);
				}
			} else {
				JOptionPane.showMessageDialog(null, "Sentimos muito\nOferta esgotada.", "Que pena...", JOptionPane.INFORMATION_MESSAGE);
			}
		} catch (SQLException ex) {
			Logger.getLogger(InterfaceGrafica.class.getName()).log(Level.SEVERE, null, ex);
		}
	}//GEN-LAST:event_TUMBotaoCompraActionPerformed

	private void TCRBotaoBoletoStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_TCRBotaoBoletoStateChanged
		TCLabelBanco.setEnabled(TCRBotaoBoleto.isSelected());
		TCComboBanco.setEnabled(TCRBotaoBoleto.isSelected());
		if (TCRBotaoBoleto.isSelected()) {
			TCRBotaoCartao.setSelected(false);
			TCRBotaoPayPal.setSelected(false);
		}
	}//GEN-LAST:event_TCRBotaoBoletoStateChanged

	private void TCRBotaoPayPalStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_TCRBotaoPayPalStateChanged
		TCLabelLogin.setEnabled(TCRBotaoPayPal.isSelected());
		TCCampoLogin.setEnabled(TCRBotaoPayPal.isSelected());
		if (TCRBotaoPayPal.isSelected()) {
			TCRBotaoCartao.setSelected(false);
			TCRBotaoBoleto.setSelected(false);
		}
	}//GEN-LAST:event_TCRBotaoPayPalStateChanged

	private void TCRBotaoCartaoStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_TCRBotaoCartaoStateChanged
		TCLabelCVC.setEnabled(TCRBotaoCartao.isSelected());
		TCLabelNro.setEnabled(TCRBotaoCartao.isSelected());
		TCLabelValidade.setEnabled(TCRBotaoCartao.isSelected());
		TCLabelFormato.setEnabled(TCRBotaoCartao.isSelected());
		TCLabelBandeira.setEnabled(TCRBotaoCartao.isSelected());
		TCLabelDigitos.setEnabled(TCRBotaoCartao.isSelected());
		TCCampoCVC.setEnabled(TCRBotaoCartao.isSelected());
		TCCampoNro.setEnabled(TCRBotaoCartao.isSelected());
		TCCampoValidade.setEnabled(TCRBotaoCartao.isSelected());
		TCComboBandeira.setEnabled(TCRBotaoCartao.isSelected());
		if (TCRBotaoCartao.isSelected()) {
			TCRBotaoPayPal.setSelected(false);
			TCRBotaoBoleto.setSelected(false);
		}
	}//GEN-LAST:event_TCRBotaoCartaoStateChanged

	private void TelaCompraComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_TelaCompraComponentShown
		TelaCompraClear();
	}//GEN-LAST:event_TelaCompraComponentShown

        private void TIOBotaoMaisOfertasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TIOBotaoMaisOfertasActionPerformed

            if( ofertas.size() <= ++indexOfertas){
                indexOfertas = 0;
            }
            TIOLabelNaoMaisOfertas.setText("");
            Oferta of = ofertas.get(indexOfertas);
            TIMLabelVIDProduto.setText(""+of.getIdProduto());
            TIMLabelVNroOferta.setText(""+of.getNroOferta());
            TIMLabelVValorOri.setText(""+of.getValorOriginal());
            TIMLabelVValorPromo.setText(""+of.getValorPromocao());
            TIMAreaDescricao.setText(""+of.getDescricao());

            TIMLabelImage.setIcon(desenhaImagem(of.getFoto(), 343, 321));
        }//GEN-LAST:event_TIOBotaoMaisOfertasActionPerformed

        private void TIOBotaoOfertasAnterioresActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TIOBotaoOfertasAnterioresActionPerformed

            if( 0 > --indexOfertas ){
                indexOfertas = ofertas.size()-1;
            }

            TIOLabelNaoMaisOfertas.setText("");
            Oferta of = ofertas.get(indexOfertas);
            TIMLabelVIDProduto.setText(""+of.getIdProduto());
            TIMLabelVNroOferta.setText(""+of.getNroOferta());
            TIMLabelVValorOri.setText(""+of.getValorOriginal());
            TIMLabelVValorPromo.setText(""+of.getValorPromocao());
            TIMAreaDescricao.setText(""+of.getDescricao());

            TIMLabelImage.setIcon(desenhaImagem(of.getFoto(), 343, 321));
        }//GEN-LAST:event_TIOBotaoOfertasAnterioresActionPerformed

        private void BLBotaoLoginActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BLBotaoLoginActionPerformed

            if (BLBotaoLogin.isSelected()) {
                TelaLogin.setVisible(true);
				BLBotaoLogin.setText("Logout");
            } else {
                try {
                    user.logout();
                    BLBotaoLogin.setText("Login");
                    TelaInicialClear();
                    BLLabelSaudacao.setText("Olá, ");
                    BLLabelUsuario.setText("Visitante");
                    BLLabelCreditos.setText("");
                } catch (SQLException ex) {
                    JOptionPane.showMessageDialog(null, ex.getMessage(), "Erro", JOptionPane.ERROR_MESSAGE);
                }
            }
}//GEN-LAST:event_BLBotaoLoginActionPerformed

        private void TUMBotaoMaisOfertasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TUMBotaoMaisOfertasActionPerformed

            if( ofertas.size() <= ++indexOfertas){
                indexOfertas = 0;
            }
            Oferta of = ofertas.get(indexOfertas);
            TUMLabelVIDProduto.setText(""+of.getIdProduto());
            TUMLabelVNroOferta.setText(""+of.getNroOferta());
            TUMLabelVValorOri.setText(""+of.getValorOriginal());
            TUMLabelVValorPromo.setText(""+of.getValorPromocao());
            TUMAreaDescricao.setText(""+of.getDescricao());

            TUMLabelImagem.setIcon(desenhaImagem(of.getFoto(), 343, 321));
        }//GEN-LAST:event_TUMBotaoMaisOfertasActionPerformed

        private void TUMBotaoOfertasAnterioresActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TUMBotaoOfertasAnterioresActionPerformed
            if( 0 > --indexOfertas ){
                indexOfertas = ofertas.size()-1;
            }

            Oferta of = ofertas.get(indexOfertas);
            TUMLabelVIDProduto.setText(""+of.getIdProduto());
            TUMLabelVNroOferta.setText(""+of.getNroOferta());
            TUMLabelVValorOri.setText(""+of.getValorOriginal());
            TUMLabelVValorPromo.setText(""+of.getValorPromocao());
            TUMAreaDescricao.setText(""+of.getDescricao());

            TUMLabelImagem.setIcon(desenhaImagem(of.getFoto(), 343, 321));
        }//GEN-LAST:event_TUMBotaoOfertasAnterioresActionPerformed

        private void TCBotaoComprarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TCBotaoComprarActionPerformed
			try {
				TelaCompraClear();
				boolean ok = true;
				/* Comeca transacao */
				db.getConnection().setAutoCommit(false); //TODO savepoint
				Oferta of = ofertas.get(indexOfertas);
				String tipoString = null;
				int tipo = -1;
				if (!TCRBotaoBoleto.isSelected() && !TCRBotaoCartao.isSelected() &&
					!TCRBotaoPayPal.isSelected()) {
					JOptionPane.showMessageDialog(null, "Esolha uma forma de pagamento.",
						"Erro", JOptionPane.ERROR_MESSAGE);
					ok = false;
				}
				//TODO Tratar as tabelas das formas de pagamento
				if(TCRBotaoBoleto.isSelected()){
					tipoString = "Boleto";
					tipo = 0;
				}
				else if (TCRBotaoCartao.isSelected()){
					if (TCCampoCVC.getText().length() != 3) {
						TCLabelCVC.setForeground(java.awt.Color.red);
						TCCampoCVC.setText("");
						ok = false;
					}
					if (TCCampoNro.getText().equals("")) {
						TCLabelNro.setForeground(java.awt.Color.red);
						ok = false;
					}
					if (TCCampoValidade.getText().equals("")) {
						TCLabelValidade.setForeground(java.awt.Color.red);
						ok = false;
					}
					tipoString = "Cartao";
					tipo = 1;
				}
				else {
					if (TCCampoLogin.getText().equals("")) {
						TCLabelLogin.setForeground(java.awt.Color.red);
						ok = false;
					}
					tipoString = "PayPal";
					tipo = 2;
				}
				if (ok) {
					int idcompra = Compra.compraOferta(db.getConnection(), of.getIdProduto(),
						of.getNroOferta(), user.getEmail(), tipoString);
					//Escolheu alguma recomendacao
					if (TRComboUsuarios.getSelectedIndex() != -1) {
						Compra.setRecomendacao (db.getConnection(), idcompra,
							recomendacoes.get(TRComboUsuarios.getSelectedIndex()),
							user.getCPF(), of.getIdProduto(), of.getNroOferta());
					}

					switch(tipo){
						case 0:
							try {
								Pagamento.pagaBoleto(db.getConnection(), idcompra, (String) TCComboBanco.getSelectedItem());

								JOptionPane.showMessageDialog(null,"Compra efetuada com sucesso!", "Parabéns", JOptionPane.INFORMATION_MESSAGE);

								TelaCompra.setVisible(false);
								TelaCompra.setAlwaysOnTop(false);
								db.getConnection().commit();
							} catch (SQLException ex) {
								JOptionPane.showMessageDialog(null, ex.getMessage(), "Erro desconhecido", JOptionPane.ERROR_MESSAGE);
								try {
									db.getConnection().rollback();
								} catch (SQLException ex1) {
									Logger.getLogger(InterfaceGrafica.class.getName()).log(Level.SEVERE, null, ex1);
								} finally {
									db.getConnection().setAutoCommit(true);
								}
							}
							break;
						case 1:
							try {
								Pagamento.pagaCartao(db.getConnection(), idcompra,
									(String) TCComboBandeira.getSelectedItem(),
									Integer.parseInt(TCCampoNro.getText()),
									Integer.parseInt(TCCampoCVC.getText()),
									TCCampoValidade.getText());
								JOptionPane.showMessageDialog(null,"Compra efetuada com sucesso!", "Parabéns", JOptionPane.INFORMATION_MESSAGE);
								TelaCompra.setVisible(false);
								TelaCompra.setAlwaysOnTop(false);
								db.getConnection().commit();
							} catch (SQLException ex) {
								if (ex.getErrorCode() == DataBase.CARTAO_VENCIDO)
									JOptionPane.showMessageDialog(null, "Cartão vencido.", "Erro do cartão", JOptionPane.ERROR_MESSAGE);
								else
									JOptionPane.showMessageDialog(null, ex.getMessage(), "Erro desconhecido"+ex.getErrorCode(), JOptionPane.ERROR_MESSAGE);
								try {
									db.getConnection().rollback();
								} catch (SQLException ex1) {
									Logger.getLogger(InterfaceGrafica.class.getName()).log(Level.SEVERE, null, ex1);
								} finally {
									db.getConnection().setAutoCommit(true);
								}
							}
							break;
						case 2:
							try {
								Pagamento.pagaPayPal(db.getConnection(), idcompra,
									TCCampoLogin.getText());
								JOptionPane.showMessageDialog(null,"Compra efetuada com sucesso!", "Parabéns", JOptionPane.INFORMATION_MESSAGE);
								TelaCompra.setVisible(false);
								TelaCompra.setAlwaysOnTop(false);
								db.getConnection().commit();
							} catch (SQLException ex) {
								JOptionPane.showMessageDialog(null, ex.getMessage(), "Erro desconhecido", JOptionPane.ERROR_MESSAGE);
								try {
									db.getConnection().rollback();
								} catch (SQLException ex1) {
									Logger.getLogger(InterfaceGrafica.class.getName()).log(Level.SEVERE, null, ex1);
								} finally {
									db.getConnection().setAutoCommit(true);
								}
							}
							break;
					}
				}
			} catch (SQLException ex) {
				Logger.getLogger(InterfaceGrafica.class.getName()).log(Level.SEVERE, null, ex);
			}
            


        }//GEN-LAST:event_TCBotaoComprarActionPerformed

		private void TLRBotaoCPFActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TLRBotaoCPFActionPerformed
			TLRBotaoEmail.setSelected(false);
		}//GEN-LAST:event_TLRBotaoCPFActionPerformed

		private void TLRBotaoEmailActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TLRBotaoEmailActionPerformed
			TLRBotaoCPF.setSelected(false);
		}//GEN-LAST:event_TLRBotaoEmailActionPerformed

		private void TUOBotaoOfertaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TUOBotaoOfertaActionPerformed
			try{
                ofertas = Oferta.getOfertasValidas(db.getConnection());
                if(!ofertas.isEmpty()){
                    Oferta of = ofertas.get(indexOfertas);
                    TUMLabelVIDProduto.setText(""+of.getIdProduto());
                    TUMLabelVNroOferta.setText(""+of.getNroOferta());
                    TUMLabelVValorOri.setText(""+of.getValorOriginal());

                    TUMBotaoCompra.setEnabled(true);
                    TUMLabelVValorPromo.setText(""+of.getValorPromocao());
                    TUMAreaDescricao.setText(""+of.getDescricao());
                    TUMLabelImagem.setIcon(desenhaImagem(of.getFoto(), 343, 321));

                } else {
                    System.err.println("Nao ha ofertas");

                    TUMLabelVIDProduto.setText("");
                    TUMBotaoCompra.setEnabled(false);
                    TUMLabelVNroOferta.setText("");
                    TUMLabelVValorOri.setText("");
                    TUMLabelVValorPromo.setText("");
                    TUMAreaDescricao.setText("");
                    FileInputStream file;
                    Image img = null;
                    try {
                        file = new FileInputStream("./images/naooferta.jpg");
                        img = ImageIO.read(file);
                    } catch (FileNotFoundException ex) {
                        Logger.getLogger(InterfaceGrafica.class.getName()).log(Level.SEVERE, null, ex);
                    } catch (IOException ex) {
                        System.err.println("IOException: " + ex.getMessage());
                    }
                    TUHPTLLabelImagem.setIcon(desenhaImagem(img, 343, 321));


                }

				CardLayout cl = (CardLayout) TUPainelDeFundo.getLayout();
				cl.show (TUPainelDeFundo, "oferta");
				TUOBotaoOferta.setText("Atualizar");
				TUOBotaoHistorico.setText("Histórico");
            } catch (SQLException ex) {
				
				JOptionPane.showMessageDialog(null, ex.getMessage(), "Erro desconhecido", JOptionPane.ERROR_MESSAGE);
            }
		}//GEN-LAST:event_TUOBotaoOfertaActionPerformed

		private void TUMostruarioComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_TUMostruarioComponentShown
			
		}//GEN-LAST:event_TUMostruarioComponentShown

		private void TIMostruarioComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_TIMostruarioComponentShown
			try{
				System.err.println ("entrou?");
                ofertas = Oferta.getOfertasValidas(db.getConnection());
                if(!ofertas.isEmpty()){
                    Oferta of = ofertas.get(indexOfertas);
                    TIMLabelVIDProduto.setText(""+of.getIdProduto());
                    TIMLabelVNroOferta.setText(""+of.getNroOferta());
                    TIMLabelVValorOri.setText(""+of.getValorOriginal());
                    TIMLabelVValorPromo.setText(""+of.getValorPromocao());
                    TIMAreaDescricao.setText(""+of.getDescricao());
                    TIMLabelImage.setIcon(desenhaImagem(of.getFoto(), 343, 321));

                } else {
                    System.err.println("Nao ha ofertas");
                }
            } catch (SQLException e) {
                System.err.println("Exception" + e.getMessage());
            } catch (NullPointerException e){
                System.err.println("Exception " +e.getCause() +" "+e.getMessage());
            }
		}//GEN-LAST:event_TIMostruarioComponentShown

		private void TUHCBotaoProximoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TUHCBotaoProximoActionPerformed
			compHistPage++;
			colocaHistoricoCompras();
		}//GEN-LAST:event_TUHCBotaoProximoActionPerformed

		private void TUHCBotaoAnteriorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TUHCBotaoAnteriorActionPerformed
			compHistPage--;
			colocaHistoricoCompras();
		}//GEN-LAST:event_TUHCBotaoAnteriorActionPerformed

		private void TUHPBotaoProximoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TUHPBotaoProximoActionPerformed
			presHistPage++;
			colocaHistoricoPresentes();
		}//GEN-LAST:event_TUHPBotaoProximoActionPerformed

		private void TUHPBotaoAnteriorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TUHPBotaoAnteriorActionPerformed
			presHistPage--;
			colocaHistoricoPresentes();
		}//GEN-LAST:event_TUHPBotaoAnteriorActionPerformed

		private void TAPBotaoProximoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TAPBotaoProximoActionPerformed
			prodPage++;
			colocaProdutosValidos();
		}//GEN-LAST:event_TAPBotaoProximoActionPerformed

		private void TAPBotaoAnteriorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TAPBotaoAnteriorActionPerformed
			prodPage--;
			colocaProdutosValidos();
		}//GEN-LAST:event_TAPBotaoAnteriorActionPerformed

		private void TAPBotaoCadastraOferta(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TAPBotaoCadastraOferta

			if (evt.getSource().equals(TAPTLLBotaoCadastro)) {

				TCOLabelVIdProduto.setText(TAPTLLabelVIDProduto.getText());

			} else if (evt.getSource().equals(TAPTRLBotaoCadastro)) {

				TCOLabelVIdProduto.setText(TAPTRLabelVIDProduto.getText());

			} else if (evt.getSource().equals(TAPBLLBotaoCadastro)) {

				TCOLabelVIdProduto.setText(TAPBLLabelVIDProduto.getText());

			} else if (evt.getSource().equals(TAPBRLBotaoCadastro)) {

				TCOLabelVIdProduto.setText(TAPBRLabelVIDProduto.getText());

			}
			TelaCadastroOferta.setVisible(true);
		}//GEN-LAST:event_TAPBotaoCadastraOferta

		private void TRBotaoOkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TRBotaoOkActionPerformed
			TelaRecomendacao.setVisible(false);
			TelaRecomendacao.setAlwaysOnTop(false);
			TelaCompra.setVisible(true);
			TelaCompra.setAlwaysOnTop(true);

		}//GEN-LAST:event_TRBotaoOkActionPerformed

		private void TAOBotaoAtualizarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TAOBotaoAtualizarActionPerformed
			prodPage = 0;
			colocaProdutosValidos();
		}//GEN-LAST:event_TAOBotaoAtualizarActionPerformed

                private void TCPBotaoCadastroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TCPBotaoCadastroActionPerformed
                    TelaCadastroProdutoClear();
                    boolean ok = true;

                    double valor = 0;
                    String caminho = null;
                    String tipo = null;

                    if (TCPCampoValor.getText().equals("")) {
                            TCPLabelValor.setForeground(java.awt.Color.red);
                            ok = false;
                    } else
                            valor = Double.parseDouble(TCPCampoValor.getText());
                    if (TCPAreaDescricao.getText().equals("")) {
                            TCPLabelDescricao.setForeground(java.awt.Color.red);
                            ok = false;
                    }
                    if (!TCPRBFisico.isSelected() && !TCPRBServico.isSelected()) {
                            TCPLabelTipo.setForeground(java.awt.Color.red);
                            ok = false;
                    }
                    if (TCPRBFisico.isSelected())	tipo = "FISICO";
                    if (TCPRBServico.isSelected())	tipo = "SERVICO";
                    //Pega o caminho da imagem
                    if (ProdutoFileChooser.getSelectedFile() != null) {
                            try {
                                    caminho = ProdutoFileChooser.getSelectedFile().getCanonicalPath();
                            } catch (IOException ex) {
                                    TCPLabelDiretorioImagem.setForeground(java.awt.Color.red);
                                    caminho = null;
                            }
                    }
                    //Se nao deu erro, insere
                    if (ok) {
                            try {
                                    Produto.novoProduto(db.getConnection(), valor,
                                            TCPAreaDescricao.getText(), tipo,
                                            empresas.get(TCPComboEmpresaCad.getSelectedIndex()).getCnpj(),
                                            TCPLabelDiretorioImagem.getText());
                                    TelaCadastroProduto.setAlwaysOnTop(false);
                                    TelaCadastroProduto.setVisible(false);
                            } catch (FileNotFoundException ex) {
                                    JOptionPane.showMessageDialog(null, "Imagem não encontrada.", "Erro", JOptionPane.ERROR_MESSAGE);
                            } catch (IOException ex) {
                                    JOptionPane.showMessageDialog(null, "Não foi possível carregar a imagem.", "Erro", JOptionPane.ERROR_MESSAGE);
                                    ex.printStackTrace();
                            } catch (Exception ex) {
                                    JOptionPane.showMessageDialog(null, ex.getMessage(), "Erro desconhecido", JOptionPane.ERROR_MESSAGE);
                            }
                    }
                }//GEN-LAST:event_TCPBotaoCadastroActionPerformed

                private void TCPBotaoSelecionarImagemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TCPBotaoSelecionarImagemActionPerformed
                    TelaCadastroProduto.setAlwaysOnTop(false);
                    ProdutoFileChooser.setVisible(true);
                    ProdutoFileChooser.showOpenDialog(this);
                }//GEN-LAST:event_TCPBotaoSelecionarImagemActionPerformed

                private void TelaCadastroProdutoComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_TelaCadastroProdutoComponentShown
                    // TODO add your handling code here:
                }//GEN-LAST:event_TelaCadastroProdutoComponentShown

                private void TCPRBServicoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TCPRBServicoActionPerformed
                    if(TCPRBServico.isSelected())
                        TCPRBFisico.setSelected(false);
                }//GEN-LAST:event_TCPRBServicoActionPerformed

                private void TCPRBFisicoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TCPRBFisicoActionPerformed
                    if(TCPRBFisico.isSelected())
                        TCPRBServico.setSelected(false);
                
                }//GEN-LAST:event_TCPRBFisicoActionPerformed

				private void ProdutoFileChooserActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ProdutoFileChooserActionPerformed
					if (evt.getActionCommand().equals(JFileChooser.APPROVE_SELECTION)) {
						try {
							TCPLabelDiretorioImagem.setText(ProdutoFileChooser.getSelectedFile().getCanonicalPath());
						} catch (Exception ex) {
							Logger.getLogger(InterfaceGrafica.class.getName()).log(Level.SEVERE, null, ex);
						}
					}
				}//GEN-LAST:event_ProdutoFileChooserActionPerformed

				private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
					try {
						empresas = Empresa.getEmpresas(db.getConnection());
						TCPComboEmpresaCad.removeAllItems();
						int i, size = empresas.size();
						for (i = 0; i < size; i++) {
							TCPComboEmpresaCad.addItem(empresas.get(i).getNome());
						}
						TelaCadastroProduto.setVisible(true);
						TelaCadastroProduto.setAlwaysOnTop(true);
					} catch (SQLException ex) {
						Logger.getLogger(InterfaceGrafica.class.getName()).log(Level.SEVERE, null, ex);
						JOptionPane.showMessageDialog(null, ex.getMessage(), "Erro desconhecido", JOptionPane.ERROR_MESSAGE);
					}
				}//GEN-LAST:event_jButton1ActionPerformed

                                private void TAPTLBotaoAlteraFotoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TAPTLBotaoAlteraFotoActionPerformed
                                    TelaCadastroOferta.setAlwaysOnTop(false);
                                    OfertaFileChooser.setVisible(true);
                                    OfertaFileChooser.showOpenDialog(this);

                                   if (evt.getSource().equals(TAPTLBotaoAlteraFoto)) {

                                        Produto of = produtos.get(4*prodPage);
                                        try {
                                            of.alteraFotoBlob(db.getConnection(), OfertaFileChooser.getSelectedFile().getCanonicalPath());
                                        } catch (FileNotFoundException ex) {
                                            Logger.getLogger(InterfaceGrafica.class.getName()).log(Level.SEVERE, null, ex);
                                        } catch (IOException ex) {
                                            Logger.getLogger(InterfaceGrafica.class.getName()).log(Level.SEVERE, null, ex);
                                        } catch (Exception ex) {
                                            Logger.getLogger(InterfaceGrafica.class.getName()).log(Level.SEVERE, null, ex);
                                        }

                                    } else if (evt.getSource().equals(TAPTRBotaoAlteraFoto)) {

                                        Produto of = produtos.get(4*prodPage+1);
                                        try {
                                            of.alteraFotoBlob(db.getConnection(), OfertaFileChooser.getSelectedFile().getCanonicalPath());
                                        } catch (FileNotFoundException ex) {
                                            Logger.getLogger(InterfaceGrafica.class.getName()).log(Level.SEVERE, null, ex);
                                        } catch (IOException ex) {
                                            Logger.getLogger(InterfaceGrafica.class.getName()).log(Level.SEVERE, null, ex);
                                        } catch (Exception ex) {
                                            Logger.getLogger(InterfaceGrafica.class.getName()).log(Level.SEVERE, null, ex);
                                        }

                                    } else if (evt.getSource().equals(TAPBLBotaoAlteraFoto)) {

                                        Produto of = produtos.get(4*prodPage+2);
                                        try {
                                            of.alteraFotoBlob(db.getConnection(), OfertaFileChooser.getSelectedFile().getCanonicalPath());
                                        } catch (FileNotFoundException ex) {
                                            Logger.getLogger(InterfaceGrafica.class.getName()).log(Level.SEVERE, null, ex);
                                        } catch (IOException ex) {
                                            Logger.getLogger(InterfaceGrafica.class.getName()).log(Level.SEVERE, null, ex);
                                        } catch (Exception ex) {
                                            Logger.getLogger(InterfaceGrafica.class.getName()).log(Level.SEVERE, null, ex);
                                        }

                                    } else if (evt.getSource().equals(TAPBRBotaoAlteraFoto)) {

                                        Produto of = produtos.get(4*prodPage+3);
                                        try {
                                            of.alteraFotoBlob(db.getConnection(), OfertaFileChooser.getSelectedFile().getCanonicalPath());
                                        } catch (FileNotFoundException ex) {
                                            Logger.getLogger(InterfaceGrafica.class.getName()).log(Level.SEVERE, null, ex);
                                        } catch (IOException ex) {
                                            Logger.getLogger(InterfaceGrafica.class.getName()).log(Level.SEVERE, null, ex);
                                        } catch (Exception ex) {
                                            Logger.getLogger(InterfaceGrafica.class.getName()).log(Level.SEVERE, null, ex);
                                        }

                                    }
                                    prodPage = 0;
                                    colocaProdutosValidos();
                                    JOptionPane.showMessageDialog(null, "Foto alterada com sucesso!", "Foto alterada", JOptionPane.INFORMATION_MESSAGE);

                                }//GEN-LAST:event_TAPTLBotaoAlteraFotoActionPerformed


    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(InterfaceGrafica.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(InterfaceGrafica.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(InterfaceGrafica.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(InterfaceGrafica.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new InterfaceGrafica().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton BLBotaoCadastro;
    private javax.swing.JToggleButton BLBotaoLogin;
    private javax.swing.JLabel BLLabelCreditos;
    private javax.swing.JLabel BLLabelSaudacao;
    private javax.swing.JLabel BLLabelUsuario;
    private javax.swing.JPanel BarraCreditos;
    private javax.swing.JPanel BarraLogin;
    private javax.swing.JFileChooser OfertaFileChooser;
    private javax.swing.JPanel PainelDeFundo;
    private javax.swing.JFileChooser ProdutoFileChooser;
    private javax.swing.JLabel TALabelGruspon;
    private javax.swing.JPanel TAMostruario;
    private javax.swing.JButton TAOBotaoAtualizar;
    private javax.swing.JPanel TAOpcoes;
    private javax.swing.JButton TAPBLBotaoAlteraFoto;
    private javax.swing.JButton TAPBLLBotaoCadastro;
    private javax.swing.JLabel TAPBLLabelEmpresa;
    private javax.swing.JLabel TAPBLLabelIDProduto;
    private javax.swing.JLabel TAPBLLabelImagem;
    private javax.swing.JLabel TAPBLLabelVEmpresa;
    private javax.swing.JLabel TAPBLLabelVIDProduto;
    private javax.swing.JLabel TAPBLLabelVTipo;
    private javax.swing.JLabel TAPBLLabelVValor;
    private javax.swing.JLabel TAPBLLabelValor;
    private javax.swing.JButton TAPBRBotaoAlteraFoto;
    private javax.swing.JButton TAPBRLBotaoCadastro;
    private javax.swing.JLabel TAPBRLabelEmpresa;
    private javax.swing.JLabel TAPBRLabelIDProduto;
    private javax.swing.JLabel TAPBRLabelImagem;
    private javax.swing.JLabel TAPBRLabelVEmpresa;
    private javax.swing.JLabel TAPBRLabelVIDProduto;
    private javax.swing.JLabel TAPBRLabelVTipo;
    private javax.swing.JLabel TAPBRLabelVValor;
    private javax.swing.JLabel TAPBRLabelValor;
    private javax.swing.JButton TAPBotaoAnterior;
    private javax.swing.JButton TAPBotaoProximo;
    private javax.swing.JPanel TAPPainelBL;
    private javax.swing.JPanel TAPPainelBR;
    private javax.swing.JPanel TAPPainelTL;
    private javax.swing.JPanel TAPPainelTR;
    private javax.swing.JButton TAPTLBotaoAlteraFoto;
    private javax.swing.JTextPane TAPTLCampoDescricao;
    private javax.swing.JButton TAPTLLBotaoCadastro;
    private javax.swing.JLabel TAPTLLabelEmpresa;
    private javax.swing.JLabel TAPTLLabelIDProduto;
    private javax.swing.JLabel TAPTLLabelImagem;
    private javax.swing.JLabel TAPTLLabelVEmpresa;
    private javax.swing.JLabel TAPTLLabelVIDProduto;
    private javax.swing.JLabel TAPTLLabelVTipo;
    private javax.swing.JLabel TAPTLLabelVValor;
    private javax.swing.JLabel TAPTLLabelValor;
    private javax.swing.JButton TAPTRBotaoAlteraFoto;
    private javax.swing.JTextPane TAPTRCampoDescricao;
    private javax.swing.JButton TAPTRLBotaoCadastro;
    private javax.swing.JLabel TAPTRLabelEmpresa;
    private javax.swing.JLabel TAPTRLabelIDProduto;
    private javax.swing.JLabel TAPTRLabelImagem;
    private javax.swing.JLabel TAPTRLabelVEmpresa;
    private javax.swing.JLabel TAPTRLabelVIDProduto;
    private javax.swing.JLabel TAPTRLabelVTipo;
    private javax.swing.JLabel TAPTRLabelVValor;
    private javax.swing.JLabel TAPTRLabelValor;
    private javax.swing.JPanel TAPainelProdutos;
    private javax.swing.JButton TCBotaoComprar;
    private javax.swing.JFormattedTextField TCCampoCVC;
    private javax.swing.JTextField TCCampoLogin;
    private javax.swing.JFormattedTextField TCCampoNro;
    private javax.swing.JFormattedTextField TCCampoValidade;
    private javax.swing.JComboBox TCComboBanco;
    private javax.swing.JComboBox TCComboBandeira;
    private javax.swing.JLabel TCLabelBanco;
    private javax.swing.JLabel TCLabelBandeira;
    private javax.swing.JLabel TCLabelCVC;
    private javax.swing.JLabel TCLabelDigitos;
    private javax.swing.JLabel TCLabelFormaPagamento;
    private javax.swing.JLabel TCLabelFormato;
    private javax.swing.JLabel TCLabelLogin;
    private javax.swing.JLabel TCLabelNro;
    private javax.swing.JLabel TCLabelObrigatorio;
    private javax.swing.JLabel TCLabelValidade;
    private javax.swing.JButton TCOBotaoCadastro;
    private javax.swing.JButton TCOBotaoSelecionarImagem;
    private javax.swing.JTextField TCOCampoHorario;
    private javax.swing.JTextField TCOCampoLocal;
    private javax.swing.JFormattedTextField TCOCampoNroPessoas;
    private javax.swing.JFormattedTextField TCOCampoQuantidade;
    private javax.swing.JFormattedTextField TCOCampoValidade;
    private javax.swing.JCheckBox TCOCheckDom;
    private javax.swing.JCheckBox TCOCheckQua;
    private javax.swing.JCheckBox TCOCheckQui;
    private javax.swing.JCheckBox TCOCheckSab;
    private javax.swing.JCheckBox TCOCheckSeg;
    private javax.swing.JCheckBox TCOCheckSex;
    private javax.swing.JCheckBox TCOCheckTer;
    private javax.swing.JLabel TCOLabelAvisoEmdias;
    private javax.swing.JLabel TCOLabelAvisoObrigatorio;
    private javax.swing.JLabel TCOLabelDados;
    private javax.swing.JLabel TCOLabelDiasuteis;
    private javax.swing.JLabel TCOLabelDiretorioImagem;
    private javax.swing.JLabel TCOLabelHorario;
    private javax.swing.JLabel TCOLabelIdproduto;
    private javax.swing.JLabel TCOLabelLocal;
    private javax.swing.JLabel TCOLabelNroPessoas;
    private javax.swing.JLabel TCOLabelQuantidade;
    private javax.swing.JLabel TCOLabelRetirada;
    private javax.swing.JLabel TCOLabelVIdProduto;
    private javax.swing.JLabel TCOLabelValidade;
    private javax.swing.JEditorPane TCPAreaDescricao;
    private javax.swing.JButton TCPBotaoCadastro;
    private javax.swing.JButton TCPBotaoSelecionarImagem;
    private javax.swing.JFormattedTextField TCPCampoValor;
    private javax.swing.JComboBox TCPComboEmpresaCad;
    private javax.swing.JLabel TCPLabelAvisoObrigatorio;
    private javax.swing.JLabel TCPLabelDados;
    private javax.swing.JLabel TCPLabelDescricao;
    private javax.swing.JLabel TCPLabelDiretorioImagem;
    private javax.swing.JLabel TCPLabelEmpresa;
    private javax.swing.JLabel TCPLabelTipo;
    private javax.swing.JLabel TCPLabelValor;
    private javax.swing.JLabel TCPLabelValorRS;
    private javax.swing.JRadioButton TCPRBFisico;
    private javax.swing.JRadioButton TCPRBServico;
    private javax.swing.JRadioButton TCRBotaoBoleto;
    private javax.swing.JRadioButton TCRBotaoCartao;
    private javax.swing.JRadioButton TCRBotaoPayPal;
    private javax.swing.JButton TCUBotaoCadastro;
    private javax.swing.JTextField TCUCampoBairro;
    private javax.swing.JFormattedTextField TCUCampoCEP;
    private javax.swing.JFormattedTextField TCUCampoCPF;
    private javax.swing.JTextField TCUCampoCidade;
    private javax.swing.JPasswordField TCUCampoConfirmacao;
    private javax.swing.JTextField TCUCampoEmail;
    private javax.swing.JTextField TCUCampoNome;
    private javax.swing.JFormattedTextField TCUCampoNro;
    private javax.swing.JTextField TCUCampoRua;
    private javax.swing.JPasswordField TCUCampoSenha;
    private javax.swing.JComboBox TCUComboUF;
    private javax.swing.JLabel TCULabelAviso;
    private javax.swing.JLabel TCULabelAvisoDigitos;
    private javax.swing.JLabel TCULabelBairro;
    private javax.swing.JLabel TCULabelCEP;
    private javax.swing.JLabel TCULabelCPF;
    private javax.swing.JLabel TCULabelCidade;
    private javax.swing.JLabel TCULabelConfirmacao;
    private javax.swing.JLabel TCULabelDados;
    private javax.swing.JLabel TCULabelEmail;
    private javax.swing.JLabel TCULabelEndereco;
    private javax.swing.JLabel TCULabelErro;
    private javax.swing.JLabel TCULabelNome;
    private javax.swing.JLabel TCULabelNro;
    private javax.swing.JLabel TCULabelRua;
    private javax.swing.JLabel TCULabelSenha;
    private javax.swing.JLabel TCULabelUF;
    private javax.swing.JTextArea TIMAreaDescricao;
    private javax.swing.JLabel TIMLabelDescricao;
    private javax.swing.JLabel TIMLabelIDProduto;
    private javax.swing.JLabel TIMLabelImage;
    private javax.swing.JLabel TIMLabelNroOferta;
    private javax.swing.JLabel TIMLabelVIDProduto;
    private javax.swing.JLabel TIMLabelVNroOferta;
    private javax.swing.JLabel TIMLabelVValorOri;
    private javax.swing.JLabel TIMLabelVValorPromo;
    private javax.swing.JLabel TIMLabelValorOriginal;
    private javax.swing.JLabel TIMLabelValorPromocional;
    private javax.swing.JLabel TIMLabelnformacoes;
    private javax.swing.JScrollPane TIMPainelDescricao;
    private javax.swing.JPanel TIMPanelImage;
    private javax.swing.JPanel TIMostruario;
    private javax.swing.JButton TIOBotaoMaisOfertas;
    private javax.swing.JButton TIOBotaoOfertasAnteriores;
    private javax.swing.JLabel TIOLabelGruspon;
    private javax.swing.JLabel TIOLabelNaoMaisOfertas;
    private javax.swing.JPanel TIOpcoes;
    private javax.swing.JButton TLBotaoLogin;
    private javax.swing.JTextField TLCampoLogin;
    private javax.swing.JPasswordField TLCampoSenha;
    private javax.swing.JLabel TLLabelErro;
    private javax.swing.JLabel TLLabelLogin;
    private javax.swing.JLabel TLLabelSenha;
    private javax.swing.JRadioButton TLRBotaoCPF;
    private javax.swing.JRadioButton TLRBotaoEmail;
    private javax.swing.JButton TRBotaoOk;
    private javax.swing.JComboBox TRComboUsuarios;
    private javax.swing.JLabel TRLabelRecOferta;
    private javax.swing.JLabel TUHCBLLabelIDCupom;
    private javax.swing.JLabel TUHCBLLabelIDProduto;
    private javax.swing.JLabel TUHCBLLabelImagem;
    private javax.swing.JLabel TUHCBLLabelNro;
    private javax.swing.JLabel TUHCBLLabelVData;
    private javax.swing.JLabel TUHCBLLabelVIDCupom;
    private javax.swing.JLabel TUHCBLLabelVIDProduto;
    private javax.swing.JLabel TUHCBLLabelVNro;
    private javax.swing.JLabel TUHCBRLabelData;
    private javax.swing.JLabel TUHCBRLabelIDCupom;
    private javax.swing.JLabel TUHCBRLabelIDProduto;
    private javax.swing.JLabel TUHCBRLabelImagem;
    private javax.swing.JLabel TUHCBRLabelNro;
    private javax.swing.JLabel TUHCBRLabelVData;
    private javax.swing.JLabel TUHCBRLabelVIDCupom;
    private javax.swing.JLabel TUHCBRLabelVIDProduto;
    private javax.swing.JLabel TUHCBRLabelVNro;
    private javax.swing.JLabel TUHCBTLabelData;
    private javax.swing.JButton TUHCBotaoAnterior;
    private javax.swing.JButton TUHCBotaoProximo;
    private javax.swing.JPanel TUHCPainelBL;
    private javax.swing.JPanel TUHCPainelBR;
    private javax.swing.JPanel TUHCPainelTL;
    private javax.swing.JPanel TUHCPainelTR;
    private javax.swing.JLabel TUHCTLLabelIDCupom;
    private javax.swing.JLabel TUHCTLLabelIDProduto;
    private javax.swing.JLabel TUHCTLLabelImagem;
    private javax.swing.JLabel TUHCTLLabelNro;
    private javax.swing.JLabel TUHCTLLabelVData;
    private javax.swing.JLabel TUHCTLLabelVIDCupom;
    private javax.swing.JLabel TUHCTLLabelVIDProduto;
    private javax.swing.JLabel TUHCTLLabelVNro;
    private javax.swing.JLabel TUHCTRLabelData;
    private javax.swing.JLabel TUHCTRLabelIDCupom;
    private javax.swing.JLabel TUHCTRLabelIDProduto;
    private javax.swing.JLabel TUHCTRLabelImagem;
    private javax.swing.JLabel TUHCTRLabelNro;
    private javax.swing.JLabel TUHCTRLabelVData;
    private javax.swing.JLabel TUHCTRLabelVIDCupom;
    private javax.swing.JLabel TUHCTRLabelVIDProduto;
    private javax.swing.JLabel TUHCTRLabelVNro;
    private javax.swing.JLabel TUHCTTLabelData;
    private javax.swing.JLabel TUHPBLLabelIDCupom;
    private javax.swing.JLabel TUHPBLLabelIDProduto;
    private javax.swing.JLabel TUHPBLLabelImagem;
    private javax.swing.JLabel TUHPBLLabelNro;
    private javax.swing.JLabel TUHPBLLabelVIDCupom;
    private javax.swing.JLabel TUHPBLLabelVIDProduto;
    private javax.swing.JLabel TUHPBLLabelVNome;
    private javax.swing.JLabel TUHPBLLabelVNro;
    private javax.swing.JLabel TUHPBRLabelIDCupom;
    private javax.swing.JLabel TUHPBRLabelIDProduto;
    private javax.swing.JLabel TUHPBRLabelImagem;
    private javax.swing.JLabel TUHPBRLabelNome;
    private javax.swing.JLabel TUHPBRLabelNro;
    private javax.swing.JLabel TUHPBRLabelVIDCupom;
    private javax.swing.JLabel TUHPBRLabelVIDProduto;
    private javax.swing.JLabel TUHPBRLabelVNome;
    private javax.swing.JLabel TUHPBRLabelVNro;
    private javax.swing.JLabel TUHPBTLabelNome;
    private javax.swing.JButton TUHPBotaoAnterior;
    private javax.swing.JButton TUHPBotaoProximo;
    private javax.swing.JPanel TUHPPainelBL;
    private javax.swing.JPanel TUHPPainelBR;
    private javax.swing.JPanel TUHPPainelTL;
    private javax.swing.JPanel TUHPPainelTR;
    private javax.swing.JLabel TUHPTLLabelIDCupom;
    private javax.swing.JLabel TUHPTLLabelIDProduto;
    private javax.swing.JLabel TUHPTLLabelImagem;
    private javax.swing.JLabel TUHPTLLabelNro;
    private javax.swing.JLabel TUHPTLLabelVIDCupom;
    private javax.swing.JLabel TUHPTLLabelVIDProduto;
    private javax.swing.JLabel TUHPTLLabelVNome;
    private javax.swing.JLabel TUHPTLLabelVNro;
    private javax.swing.JLabel TUHPTRLabelIDCupom;
    private javax.swing.JLabel TUHPTRLabelIDProduto;
    private javax.swing.JLabel TUHPTRLabelImagem;
    private javax.swing.JLabel TUHPTRLabelNome;
    private javax.swing.JLabel TUHPTRLabelNro;
    private javax.swing.JLabel TUHPTRLabelVIDCupom;
    private javax.swing.JLabel TUHPTRLabelVIDProduto;
    private javax.swing.JLabel TUHPTRLabelVNome;
    private javax.swing.JLabel TUHPTRLabelVNro;
    private javax.swing.JLabel TUHPTTLabelNome;
    private javax.swing.JPanel TUHPainelCompras;
    private javax.swing.JPanel TUHPainelPresentes;
    private javax.swing.JTabbedPane TUHistorico;
    private javax.swing.JTextArea TUMAreaDescricao;
    private javax.swing.JButton TUMBotaoCompra;
    private javax.swing.JButton TUMBotaoMaisOfertas;
    private javax.swing.JButton TUMBotaoOfertasAnteriores;
    private javax.swing.JLabel TUMLabelDescricao;
    private javax.swing.JLabel TUMLabelIDProduto;
    private javax.swing.JLabel TUMLabelImagem;
    private javax.swing.JLabel TUMLabelNroOferta;
    private javax.swing.JLabel TUMLabelVIDProduto;
    private javax.swing.JLabel TUMLabelVNroOferta;
    private javax.swing.JLabel TUMLabelVValorOri;
    private javax.swing.JLabel TUMLabelVValorPromo;
    private javax.swing.JLabel TUMLabelValorOriginal;
    private javax.swing.JLabel TUMLabelValorPromocional;
    private javax.swing.JLabel TUMLabelnformacoes;
    private javax.swing.JScrollPane TUMPainelDescricao;
    private javax.swing.JPanel TUMPainelImagem;
    private javax.swing.JPanel TUMostruario;
    private javax.swing.JButton TUOBotaoHistorico;
    private javax.swing.JButton TUOBotaoOferta;
    private javax.swing.JLabel TUOLabelGruspon;
    private javax.swing.JPanel TUOpcoes;
    private javax.swing.JPanel TUPainelDeFundo;
    private javax.swing.JPanel TelaAdmin;
    private javax.swing.JDialog TelaCadastroOferta;
    private javax.swing.JDialog TelaCadastroProduto;
    private javax.swing.JDialog TelaCadastroUsuario;
    private javax.swing.JDialog TelaCompra;
    private javax.swing.JPanel TelaInicial;
    private javax.swing.JDialog TelaLogin;
    private javax.swing.JDialog TelaRecomendacao;
    private javax.swing.JPanel TelaUsuario;
    private javax.swing.JButton jButton1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JTextPane jTextPane3;
    private javax.swing.JTextPane jTextPane4;
    // End of variables declaration//GEN-END:variables
}
